diff options
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/main.gd | 2 | ||||
-rw-r--r-- | scenes/main.tscn | 1 | ||||
-rw-r--r-- | scenes/microgames/fishin/fishin.gd | 49 | ||||
-rw-r--r-- | scenes/microgames/fishin/node_2d.tscn | 14 | ||||
-rw-r--r-- | scenes/stockticker/Stock Ticker.tscn | 1 | ||||
-rw-r--r-- | scenes/stockticker/transactions.gd | 13 |
6 files changed, 66 insertions, 14 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..ac359e8 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 @@ -106,23 +107,47 @@ func _on_texture_button_button_up() -> void: # show fish var fish_choice: FishType = randi_range(0,len(fishes)) - - 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 :)") + $"Yippee!".play() + FishType.SALMON: + salmon.visible = true + fish_chosen.emit(salmon.get_node("SalmonSprite"), "Sockeye Salmon") + $"Yippee!".play() + FishType.BASS: + bass.visible = true + fish_chosen.emit(bass.get_node("LargemouthBassSprite"), "Largemouth Bass") + $"Yippee!".play() + FishType.HUMUHUMUNUKUNUKUAPUA_A: + humuhumunukunukuapua_a.visible = true + fish_chosen.emit(humuhumunukunukuapua_a.get_node("Sprite2D"), "Humuhumunukunukuapua'a") + $"Yippee!".play() + FishType.CATFSIH: + catfsih.visible = true + fish_chosen.emit(catfsih.get_node("CatfishSprite"), "Catfish :3") + $Meow.play() + FishType.DOGFISH: + dogfish.visible = true + fish_chosen.emit(dogfish.get_node("DogfishSprite"), "Dogfish 🐶") + $Bark.play() + FishType.ANGLERFISH: + anglerfish.visible = true + fish_chosen.emit(anglerfish.get_node("AnglerfishSprirtre"), "Anglerfish") + $"Yippee!".play() + FishType.MOBY_DICK: + moby_dick.visible = true + fish_chosen.emit(moby_dick.get_node("Moby-DickSprite"), "Moby Dick") + FishType.LEAPING_SMACKEREL: + leaping_smackerel.visible = true + fish_chosen.emit(leaping_smackerel.get_node("LeapingSmackerelSprite"), "LEAPING SMACKEREL! WAHOO!") + $"THE LEAPING SMACKEREL!".play() + success_timer.wait_time *= 2 in_game_timer.stop() in_game_timer.wait_time = IN_GAME_WAIT_TIME success_timer.start() - $"Yippee!".play() get_window().title = "Yippee!" diff --git a/scenes/microgames/fishin/node_2d.tscn b/scenes/microgames/fishin/node_2d.tscn index 0c23b7c..3f6f3b4 100644 --- a/scenes/microgames/fishin/node_2d.tscn +++ b/scenes/microgames/fishin/node_2d.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=3 uid="uid://c4s4pigu4pr48"] +[gd_scene load_steps=29 format=3 uid="uid://c4s4pigu4pr48"] [ext_resource type="Texture2D" uid="uid://voruypgyi77e" path="res://scenes/stockticker/UI-Background-Colour.png" id="1_cxqat"] [ext_resource type="Script" path="res://scenes/microgames/fishin/fishin.gd" id="1_srw8b"] @@ -22,6 +22,9 @@ [ext_resource type="Texture2D" uid="uid://dobgdcs2lkbwn" path="res://scenes/microgames/fishin/AnglerFish.png" id="19_64si4"] [ext_resource type="Texture2D" uid="uid://bi8wwmpxdr1sg" path="res://scenes/microgames/fishin/Moby-Dick.png" id="20_emk52"] [ext_resource type="Texture2D" uid="uid://bquf4lqso1h0e" path="res://scenes/microgames/fishin/LeapingSmackerel.png" id="21_mppni"] +[ext_resource type="AudioStream" uid="uid://wtoxhk0tf8ev" path="res://funny_sounds/Cat Meow - Minecraft Sound Effect (HD).mp3" id="23_2n5pw"] +[ext_resource type="AudioStream" uid="uid://cr34g4np4h508" path="res://funny_sounds/boney boark.mp3" id="24_rbg0g"] +[ext_resource type="AudioStream" uid="uid://keguv7ldvk2e" path="res://funny_sounds/THE LEAPING SMACKEREL.mp3" id="25_qmt08"] [sub_resource type="Animation" id="Animation_bep6n"] length = 0.001 @@ -334,6 +337,15 @@ stream = ExtResource("12_4oxp1") [node name="Fart" type="AudioStreamPlayer" parent="."] stream = ExtResource("13_kxv5l") +[node name="Meow" type="AudioStreamPlayer" parent="."] +stream = ExtResource("23_2n5pw") + +[node name="Bark" type="AudioStreamPlayer" parent="."] +stream = ExtResource("24_rbg0g") + +[node name="THE LEAPING SMACKEREL!" type="AudioStreamPlayer" parent="."] +stream = ExtResource("25_qmt08") + [connection signal="button_up" from="TextureButton" to="." method="_on_texture_button_button_up"] [connection signal="timeout" from="StartGame" to="." method="_on_start_game_timeout"] [connection signal="timeout" from="InGame" to="." method="_on_in_game_timeout"] diff --git a/scenes/stockticker/Stock Ticker.tscn b/scenes/stockticker/Stock Ticker.tscn index 6afa1af..5a56e1b 100644 --- a/scenes/stockticker/Stock Ticker.tscn +++ b/scenes/stockticker/Stock Ticker.tscn @@ -30,6 +30,7 @@ scale = Vector2(0.671875, 0.622) texture = ExtResource("9_bv8iw") [node name="Label" type="Label" parent="."] +visible = false offset_left = 823.0 offset_top = 588.0 offset_right = 1082.0 diff --git a/scenes/stockticker/transactions.gd b/scenes/stockticker/transactions.gd index 39e25b9..3a56c5a 100644 --- a/scenes/stockticker/transactions.gd +++ b/scenes/stockticker/transactions.gd @@ -6,6 +6,8 @@ extends Node2D signal buy(amount: Variant) signal sell(amount: Variant) +var fish_name: String + func _on_stonks_buy(amount: Variant) -> void: print("-$%s" % amount.toString()) buy.emit(amount) @@ -19,3 +21,14 @@ func _on_stonks_sell(amount: Variant) -> void: # Scope creep! func start(): $Timer.start() + get_window().title = fish_name + + +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 + self.fish_name = fish_name + |