summaryrefslogtreecommitdiff
path: root/demos/2d/platformer/coin.gd
blob: 11187327079a926b0af43eceb7d9ac5ab675e42b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

extends Area2D

# Member variables
var taken = false


func _on_body_enter( body ):
	if (not taken and body extends preload("res://player.gd")):
		get_node("anim").play("taken")
		taken = true


func _on_coin_area_enter(area):
	pass # replace with function body


func _on_coin_area_enter_shape(area_id, area, area_shape, area_shape):
	pass # replace with function body