42 lines
1.1 KiB
GDScript
42 lines
1.1 KiB
GDScript
extends Control
|
|
|
|
@onready var animated_sprite_2d: AnimatedSprite2D = $StopPhase/AnimatedSprite2D
|
|
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
|
@onready var count_down_animation: AnimatedSprite2D = $CountDown/CountDownAnimation
|
|
@onready var go_finish: Control = $GoFinish
|
|
@onready var go_animation_2d: AnimatedSprite2D = $GoFinish/GoAnimation2D
|
|
|
|
#func _input(event: InputEvent) -> void:
|
|
#if event.is_action_pressed("grab_item"):
|
|
#animation_player.play("stop-phase")
|
|
|
|
func play_ready_go():
|
|
animation_player.play("ready-go")
|
|
|
|
func play_stop_phase():
|
|
animation_player.play("stop-phase")
|
|
|
|
func play_safe_zone_appear():
|
|
animation_player.play("safe-zone-appear")
|
|
|
|
func stop_phase_anim_play():
|
|
animated_sprite_2d.play("stop-phase")
|
|
|
|
func stop_phase_anim_stop():
|
|
animated_sprite_2d.stop()
|
|
|
|
func play_countdown_30s():
|
|
count_down_animation.play("30s")
|
|
|
|
func play_countdown_15s():
|
|
count_down_animation.play("15s")
|
|
|
|
func play_go_animation():
|
|
animation_player.play("go_animation")
|
|
|
|
func play_go_finish_animation():
|
|
if go_finish:
|
|
go_finish.visible = true
|
|
if go_animation_2d:
|
|
go_animation_2d.play("go_animation")
|