diff options
Diffstat (limited to 'game/transition/transition.gd')
-rw-r--r-- | game/transition/transition.gd | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/game/transition/transition.gd b/game/transition/transition.gd new file mode 100644 index 0000000..45daf65 --- /dev/null +++ b/game/transition/transition.gd @@ -0,0 +1,24 @@ +class_name Transition +extends Node2D + +@export var speed_scale = 1.0 + +@onready var animation_player = %AnimationPlayer +@onready var microgame_viewport_container = %MicrogameViewportContainer + +signal finished +signal microgame_viewport_hidden + + +func _ready() -> void: + animation_player.speed_scale = speed_scale + + +func _emit_microgame_viewport_hidden() -> void: + microgame_viewport_hidden.emit() + + +func show_win_animation(): + animation_player.play("win_transition") + await animation_player.animation_finished + finished.emit() |