summaryrefslogtreecommitdiff
path: root/scenes/microgames/fishin/fishin.gd
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-16 19:38:06 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-16 19:38:06 -0600
commita472a321179268710722232ee61aa04b369c627c (patch)
tree720d7c078713c73126d0b20575c2d2a4f4facd2a /scenes/microgames/fishin/fishin.gd
parent162f6ba656c3ed050526df7e0aa31d8e284b640c (diff)
Make the fishing minigame transition into stonks
Diffstat (limited to 'scenes/microgames/fishin/fishin.gd')
-rw-r--r--scenes/microgames/fishin/fishin.gd13
1 files changed, 11 insertions, 2 deletions
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()