summaryrefslogtreecommitdiff
path: root/scenes/main.gd
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-17 15:10:46 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-17 15:10:46 -0600
commita0e3df5b4c0638667e72ff5e2b6071e0d62148cf (patch)
treec31f5b3dfe46bc59ca4171ad217c619274b9c9cb /scenes/main.gd
parent2060290b523646636bc3d46416c7fcc30311ed94 (diff)
parentcd2144e9bb8320285a1e374588621a1d2ccefb57 (diff)
Merge branch 'main' into fully_generalized_fish
Diffstat (limited to 'scenes/main.gd')
-rw-r--r--scenes/main.gd14
1 files changed, 14 insertions, 0 deletions
diff --git a/scenes/main.gd b/scenes/main.gd
index ff79be6..8fe50aa 100644
--- a/scenes/main.gd
+++ b/scenes/main.gd
@@ -50,10 +50,21 @@ func _on_microgame_spawn_timer_timeout() -> void:
# Connect signals
window_instance.win.connect(_on_microgame_win)
+ window_instance.lose.connect(_on_microgame_lose)
+ window_instance.ad_open.connect(_on_ad_open)
+ $"Score window (real)/Score window".net_worth.timesEquals(0.9)
+
+func _on_ad_open(window: MicrogameWindow):
+ $"Score window (real)/Score window".net_worth.timesEquals(0.95)
func _on_microgame_win(window: MicrogameWindow):
print("yay")
+
+func _on_microgame_lose(window: MicrogameWindow):
+ print("noooooo")
+ $LosingSoundEffect.play()
+ $"Score window (real)/Score window".net_worth.timesEquals(0.8)
func _on_fishin_win(fish_caught: Fishin.FishType) -> void:
@@ -63,6 +74,7 @@ func _on_fishin_win(fish_caught: Fishin.FishType) -> void:
$Clippette.start_dialogue()
$"Score window (real)".visible = true
fish_seen.push_back(fish_caught)
+ $Music.play()
func _on_score_window_donezo() -> void:
@@ -73,6 +85,8 @@ func _on_score_window_donezo() -> void:
$"Stock ticker".queue_free()
get_window().position = Vector2i(10000, 10000)
+ $Music.volume_db = 10
+
var new_window = Window.new()
new_window.size = Vector2i(1280, 720)
new_window.initial_position = Window.WINDOW_INITIAL_POSITION_CENTER_SCREEN_WITH_MOUSE_FOCUS