summaryrefslogtreecommitdiff
path: root/scenes
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-17 15:03:36 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-17 15:03:36 -0600
commit5283cc1d097b67c681e0eee80e2d85e7424a0d5c (patch)
treec3bdbf8c638a75eec285573ddc4199fc788306f1 /scenes
parentd267483d31c93e6070badbc5f22ff300a9349d1a (diff)
Proof of concept (specialized generalized fish)
Diffstat (limited to 'scenes')
-rw-r--r--scenes/gameover.tscn2
-rw-r--r--scenes/main.tscn1
-rw-r--r--scenes/microgames/fishin/fishin.gd31
-rw-r--r--scenes/stockticker/transactions.gd9
-rw-r--r--scenes/title.tscn2
5 files changed, 34 insertions, 11 deletions
diff --git a/scenes/gameover.tscn b/scenes/gameover.tscn
index 7759edd..1732111 100644
--- a/scenes/gameover.tscn
+++ b/scenes/gameover.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=46 format=3 uid="uid://be813saajvxxs"]
+[gd_scene load_steps=46 format=3 uid="uid://dv67unre56t5b"]
[ext_resource type="Texture2D" uid="uid://dobiydav6k32e" path="res://UI/GameOverScreen.png" id="1_60m3n"]
[ext_resource type="Script" path="res://scenes/gameover.gd" id="1_clwwq"]
diff --git a/scenes/main.tscn b/scenes/main.tscn
index 6c1f5ff..4de6e4f 100644
--- a/scenes/main.tscn
+++ b/scenes/main.tscn
@@ -351,4 +351,5 @@ stream = ExtResource("12_xycxa")
[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 1aa911c..e657b22 100644
--- a/scenes/microgames/fishin/fishin.gd
+++ b/scenes/microgames/fishin/fishin.gd
@@ -14,6 +14,7 @@ enum FishType {
signal win
signal lose
+signal fish_chosen(fish_sprite: Sprite2D, fish_name: String)
const IN_GAME_WAIT_TIME = 10
@@ -108,17 +109,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
diff --git a/scenes/title.tscn b/scenes/title.tscn
index efb165e..f2c950a 100644
--- a/scenes/title.tscn
+++ b/scenes/title.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=47 format=3 uid="uid://uqljciqhbulx"]
+[gd_scene load_steps=47 format=3 uid="uid://bhcfvjkkpmtr4"]
[ext_resource type="Script" path="res://scenes/title.gd" id="1_q3sds"]
[ext_resource type="Texture2D" uid="uid://bmgnk2m8rj1n1" path="res://UI/StartScreen.png" id="1_xa24a"]