From 2060290b523646636bc3d46416c7fcc30311ed94 Mon Sep 17 00:00:00 2001 From: Zoey Kitt Date: Sun, 17 Nov 2024 14:56:47 -0600 Subject: Don't spawn microgames until Clippette's done talking --- .../LegallyDistinctPaperclipAssistant/paperclip.gd | 6 ++++++ scenes/LegallyDistinctPaperclipAssistant/window.tscn | 20 +++++++++++++++++--- scenes/main.gd | 6 +++++- scenes/main.tscn | 1 + 4 files changed, 29 insertions(+), 4 deletions(-) (limited to 'scenes') diff --git a/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd b/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd index 3a87c66..6624498 100644 --- a/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd +++ b/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd @@ -1,5 +1,7 @@ extends Window +signal intro_finished + const START_TEXT = "Hi, I'm your legally\ndistinct paperclip\nassistant,\nClippette..." const TOUCHED = "Don't touch me!" @@ -53,3 +55,7 @@ func _on_timer_timeout() -> void: func start_dialogue(): $AnimationPlayer.play("intro") + + +func finish_intro(): + intro_finished.emit() diff --git a/scenes/LegallyDistinctPaperclipAssistant/window.tscn b/scenes/LegallyDistinctPaperclipAssistant/window.tscn index 6af02fa..6cd3902 100644 --- a/scenes/LegallyDistinctPaperclipAssistant/window.tscn +++ b/scenes/LegallyDistinctPaperclipAssistant/window.tscn @@ -190,10 +190,24 @@ tracks/6/path = NodePath("Label:visible") tracks/6/interp = 1 tracks/6/loop_wrap = true tracks/6/keys = { -"times": PackedFloat32Array(0, 16.9422), -"transitions": PackedFloat32Array(1, 1), +"times": PackedFloat32Array(0, 16.9422, 18), +"transitions": PackedFloat32Array(1, 1, 1), "update": 1, -"values": [true, false] +"values": [true, false, true] +} +tracks/7/type = "method" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath(".") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(18), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"finish_intro" +}] } [sub_resource type="Animation" id="Animation_umwwq"] diff --git a/scenes/main.gd b/scenes/main.gd index feb39c7..ff79be6 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -59,7 +59,6 @@ func _on_microgame_win(window: MicrogameWindow): func _on_fishin_win(fish_caught: Fishin.FishType) -> void: $Fishin.queue_free() $"Stock ticker".start() - $"Microgame spawn timer".start() $Clippette.visible = true $Clippette.start_dialogue() $"Score window (real)".visible = true @@ -93,3 +92,8 @@ func on_other_fishin_win(fish_caught: Fishin.FishType, fishin: Fishin, stonk, wi stonk.start() else: window.queue_free() + + +func _on_clippette_intro_finished() -> void: + _on_microgame_spawn_timer_timeout() + $"Microgame spawn timer".start() diff --git a/scenes/main.tscn b/scenes/main.tscn index e6d1ef1..770e6db 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -340,6 +340,7 @@ position = Vector2(0, 0) scale = Vector2(1, 1) [connection signal="timeout" from="Microgame spawn timer" to="." method="_on_microgame_spawn_timer_timeout"] +[connection signal="intro_finished" from="Clippette" to="." method="_on_clippette_intro_finished"] [connection signal="donezo" from="Score window (real)/Score window" to="." method="_on_score_window_donezo"] [connection signal="buy" from="Stock ticker" to="Score window (real)/Score window" method="_on_stock_ticker_buy"] [connection signal="sell" from="Stock ticker" to="Score window (real)/Score window" method="_on_stock_ticker_sell"] -- cgit v1.2.3