Files
project-thought-experiment/scripts/interactables/completer/button_stand.gd
2024-01-26 00:00:07 +01:00

14 lines
318 B
GDScript

extends Completer
@onready var animation_player: AnimationPlayer = $AnimationPlayer
func _on_interaction_area_interacted():
if completed:
animation_player.play_backwards("press")
else:
animation_player.play("press")
toggle_complete()
if one_shot:
await animation_player.animation_finished
$Button.hide()