mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-05 07:20:07 +01:00
19 lines
352 B
GDScript
19 lines
352 B
GDScript
extends Area2D
|
|
|
|
# Member variables
|
|
var taken = false
|
|
|
|
|
|
func _on_body_enter( body ):
|
|
if not taken and body is preload("res://player.gd"):
|
|
$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
|