summaryrefslogtreecommitdiff
path: root/game/transition/transition.gd
diff options
context:
space:
mode:
authorHenrique Alves <henriquelalves@gmail.com>2024-01-25 02:04:28 +0200
committerHenrique Alves <henriquelalves@gmail.com>2024-01-25 02:04:28 +0200
commit22da7c525f561f612054b6774f2706747eaa3c9a (patch)
tree9efb99f3730abba2888a56eaed920c01806e8d4f /game/transition/transition.gd
parenta4ed38306d49a4654570d48d6a7fe5c810ec5da8 (diff)
downloadgamejam-ggj-2024-22da7c525f561f612054b6774f2706747eaa3c9a.tar.gz
gamejam-ggj-2024-22da7c525f561f612054b6774f2706747eaa3c9a.tar.bz2
gamejam-ggj-2024-22da7c525f561f612054b6774f2706747eaa3c9a.zip
testing transition flow
Diffstat (limited to 'game/transition/transition.gd')
-rw-r--r--game/transition/transition.gd24
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()