diff options
Diffstat (limited to 'scenes/microgames/fishin/fishin.gd')
-rw-r--r-- | scenes/microgames/fishin/fishin.gd | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/scenes/microgames/fishin/fishin.gd b/scenes/microgames/fishin/fishin.gd index 44b60db..3a7a704 100644 --- a/scenes/microgames/fishin/fishin.gd +++ b/scenes/microgames/fishin/fishin.gd @@ -1,4 +1,6 @@ -extends MicrogameWindow +extends Node2D + +signal win const IN_GAME_WAIT_TIME = 10 @@ -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,8 @@ 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() + $"Yippee!".play() func _on_start_game_timeout() -> void: @@ -84,7 +90,7 @@ func _on_start_game_timeout() -> void: mouse.visible = true num_clicks = randi_range(5,21) - num_clicks = 21 + #num_clicks = 21 # YOU LOSE @@ -103,6 +109,7 @@ func _on_in_game_timeout() -> void: in_game_timer.stop() succfail_timer.start() + $"Fart".play() func _on_success_fail_timeout() -> void: @@ -111,3 +118,7 @@ func _on_success_fail_timeout() -> void: you.visible = true succfail_timer.stop() start_game_timer.start() + + +func _on_success_timeout() -> void: + win.emit() |