virtualx-engine/demos/3d/platformer/coin.gd

12 lines
192 B
GDScript3
Raw Normal View History

2014-02-10 02:10:30 +01:00
extends Area
# member variables
2014-02-10 02:10:30 +01:00
var taken = false
func _on_coin_body_enter(body):
2014-02-10 02:10:30 +01:00
if (not taken and body extends preload("res://player.gd")):
get_node("anim").play("take")
taken=true