summaryrefslogtreecommitdiff
path: root/scenes
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-17 13:06:44 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-17 13:06:44 -0600
commit1b7ea447c0459893dc9240ad7f4ceeef2dd3189f (patch)
tree637f87949b6110d1a59016947f5457b99095fde6 /scenes
parent49da4da8a2805d93994d6ff317101dd48fbecf2b (diff)
Proof of concept (specialized generalized fish)
Diffstat (limited to 'scenes')
-rw-r--r--scenes/main.gd2
-rw-r--r--scenes/main.tscn1
-rw-r--r--scenes/microgames/fishin/fishin.gd31
-rw-r--r--scenes/stockticker/transactions.gd9
4 files changed, 33 insertions, 10 deletions
diff --git a/scenes/main.gd b/scenes/main.gd
index bfee6d1..4600689 100644
--- a/scenes/main.gd
+++ b/scenes/main.gd
@@ -44,7 +44,7 @@ func _on_fishin_win() -> void:
$Clippette.visible = true
$Clippette.start_dialogue()
$"Score window (real)".visible = true
-
+
func _on_score_window_donezo() -> void:
for child in get_children():
diff --git a/scenes/main.tscn b/scenes/main.tscn
index c805906..e6d1ef1 100644
--- a/scenes/main.tscn
+++ b/scenes/main.tscn
@@ -343,4 +343,5 @@ scale = Vector2(1, 1)
[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"]
+[connection signal="fish_chosen" from="Fishin" to="Stock ticker" method="_on_fishin_fish_chosen"]
[connection signal="win" from="Fishin" to="." method="_on_fishin_win"]
diff --git a/scenes/microgames/fishin/fishin.gd b/scenes/microgames/fishin/fishin.gd
index abaf999..475a97a 100644
--- a/scenes/microgames/fishin/fishin.gd
+++ b/scenes/microgames/fishin/fishin.gd
@@ -13,6 +13,7 @@ enum FishType {
}
signal win
+signal fish_chosen(fish_sprite: Sprite2D, fish_name: String)
const IN_GAME_WAIT_TIME = 10
@@ -107,17 +108,29 @@ func _on_texture_button_button_up() -> void:
# show fish
var fish_choice: FishType = randi_range(0,len(fishes))
+ # hehe
+ fish_choice = FishType.GAR
match fish_choice:
- FishType.GAR: gar.visible = true
- FishType.SALMON: salmon.visible = true
- FishType.BASS: bass.visible = true
- FishType.HUMUHUMUNUKUNUKUAPUA_A: humuhumunukunukuapua_a.visible = true
- FishType.CATFSIH: catfsih.visible = true
- FishType.DOGFISH: dogfish.visible = true
- FishType.ANGLERFISH: anglerfish.visible = true
- FishType.MOBY_DICK: moby_dick.visible = true
- FishType.LEAPING_SMACKEREL: leaping_smackerel.visible = true
+ FishType.GAR:
+ gar.visible = true
+ fish_chosen.emit(gar.get_node("GarSprite"), "Gar :)")
+ FishType.SALMON:
+ salmon.visible = true
+ FishType.BASS:
+ bass.visible = true
+ FishType.HUMUHUMUNUKUNUKUAPUA_A:
+ humuhumunukunukuapua_a.visible = true
+ FishType.CATFSIH:
+ catfsih.visible = true
+ FishType.DOGFISH:
+ dogfish.visible = true
+ FishType.ANGLERFISH:
+ anglerfish.visible = true
+ FishType.MOBY_DICK:
+ moby_dick.visible = true
+ FishType.LEAPING_SMACKEREL:
+ leaping_smackerel.visible = true
in_game_timer.stop()
in_game_timer.wait_time = IN_GAME_WAIT_TIME
diff --git a/scenes/stockticker/transactions.gd b/scenes/stockticker/transactions.gd
index 39e25b9..98cad35 100644
--- a/scenes/stockticker/transactions.gd
+++ b/scenes/stockticker/transactions.gd
@@ -19,3 +19,12 @@ func _on_stonks_sell(amount: Variant) -> void:
# Scope creep!
func start():
$Timer.start()
+
+
+func set_icon(sprite: Sprite2D):
+ $Node2D/Sprite2D.texture = sprite.texture
+
+
+func _on_fishin_fish_chosen(fish_sprite: Sprite2D, fish_name: String) -> void:
+ $Sprite2D.texture = fish_sprite.texture
+ $Label.text = fish_name