mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
free coin in 3D platformer
This commit is contained in:
@@ -9,3 +9,9 @@ func _on_coin_body_enter(body):
|
||||
if (not taken and body extends preload("res://player.gd")):
|
||||
get_node("anim").play("take")
|
||||
taken = true
|
||||
|
||||
|
||||
func _on_anim_finished():
|
||||
if get_node("anim").get_current_animation() == "take":
|
||||
queue_free()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user