platformer-game-test/src/Items/Orb.gd

7 lines
211 B
GDScript3
Raw Normal View History

2020-11-25 23:35:48 +00:00
extends Area2D
func _on_body_entered(body:Node)->void:
if body.name == "Player":
2020-11-26 02:32:02 +00:00
AudioManager.play_sfx(AudioManager.Sfx.ORB_COLLECTION)
2020-11-25 23:35:48 +00:00
GameState.orb_collected()
$AnimationPlayer.play("collected")