mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
Update 3D Platformer for 4.0 (#770)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
extends Area3D
|
||||
|
||||
|
||||
var taken = false
|
||||
|
||||
|
||||
func _on_coin_body_enter(body):
|
||||
if not taken and body is preload("res://player/player.gd"):
|
||||
get_node(^"Animation").play("take")
|
||||
if not taken and body is Player:
|
||||
$Animation.play(&"take")
|
||||
taken = true
|
||||
|
||||
Reference in New Issue
Block a user