From a472a321179268710722232ee61aa04b369c627c Mon Sep 17 00:00:00 2001 From: Zoey Kitt Date: Sat, 16 Nov 2024 19:38:06 -0600 Subject: Make the fishing minigame transition into stonks --- scenes/microgames/fishin/fishin.gd | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scenes/microgames/fishin/fishin.gd') diff --git a/scenes/microgames/fishin/fishin.gd b/scenes/microgames/fishin/fishin.gd index c6f62d9..6d53964 100644 --- a/scenes/microgames/fishin/fishin.gd +++ b/scenes/microgames/fishin/fishin.gd @@ -1,5 +1,7 @@ extends Node2D +signal win + const IN_GAME_WAIT_TIME = 10 var pulling: Sprite2D @@ -13,7 +15,9 @@ var shake2: ShakePivot var shake3: ShakePivot var start_game_timer: Timer var in_game_timer: Timer -var succfail_timer: Timer +# This used to mean "success/failure" but now means "you succ, failure" +var succfail_timer: Timer +var success_timer: Timer var in_minigame = false var num_clicks = 0 @@ -32,6 +36,7 @@ func _ready() -> void: start_game_timer = $StartGame in_game_timer = $InGame succfail_timer = $SuccessFail + success_timer = $Success # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -63,7 +68,7 @@ func _on_texture_button_button_up() -> void: in_game_timer.stop() in_game_timer.wait_time = IN_GAME_WAIT_TIME - succfail_timer.start() + success_timer.start() func _on_start_game_timeout() -> void: @@ -111,3 +116,7 @@ func _on_success_fail_timeout() -> void: you.visible = true succfail_timer.stop() start_game_timer.start() + + +func _on_success_timeout() -> void: + win.emit() -- cgit v1.2.3