14 lines
278 B
GDScript
14 lines
278 B
GDScript
extends StaticBody2D
|
|
|
|
func _ready():
|
|
$Sprite/AnimationPlayer.play("default")
|
|
|
|
func _on_PlayerCollision(body):
|
|
if visible:
|
|
GlobalState.keys['yellow'] = true
|
|
$SoundCollected.play()
|
|
hide()
|
|
|
|
func _on_SoundCollected_finished():
|
|
queue_free()
|
|
get_parent().remove_child(self)
|