diff options
-rw-r--r-- | funny_sounds/gamblebreakcore [cAofoH_84BM].opus | bin | 0 -> 1323326 bytes | |||
-rw-r--r-- | funny_sounds/gamblecore.mp3 | bin | 0 -> 1579488 bytes | |||
-rw-r--r-- | funny_sounds/gamblecore.mp3.import | 19 | ||||
-rw-r--r-- | readme.md | 4 | ||||
-rw-r--r-- | scenes/main.gd | 14 | ||||
-rw-r--r-- | scenes/main.tscn | 10 | ||||
-rw-r--r-- | scenes/microgames/ad/ad_window.gd | 8 | ||||
-rw-r--r-- | scenes/microgames/ad/ad_window.tscn | 6 | ||||
-rw-r--r-- | scenes/microgames/fishin/fishin.gd | 2 | ||||
-rw-r--r-- | scenes/microgames/microgame_window.gd | 2 | ||||
-rw-r--r-- | scenes/score_window/score_window.gd | 2 | ||||
-rw-r--r-- | scenes/title.gd | 2 |
12 files changed, 65 insertions, 4 deletions
diff --git a/funny_sounds/gamblebreakcore [cAofoH_84BM].opus b/funny_sounds/gamblebreakcore [cAofoH_84BM].opus Binary files differnew file mode 100644 index 0000000..aff383f --- /dev/null +++ b/funny_sounds/gamblebreakcore [cAofoH_84BM].opus diff --git a/funny_sounds/gamblecore.mp3 b/funny_sounds/gamblecore.mp3 Binary files differnew file mode 100644 index 0000000..2d59767 --- /dev/null +++ b/funny_sounds/gamblecore.mp3 diff --git a/funny_sounds/gamblecore.mp3.import b/funny_sounds/gamblecore.mp3.import new file mode 100644 index 0000000..ea97712 --- /dev/null +++ b/funny_sounds/gamblecore.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://di3mxkflh6a3o" +path="res://.godot/imported/gamblecore.mp3-b97531db556457a634a248b9722aaaf7.mp3str" + +[deps] + +source_file="res://funny_sounds/gamblecore.mp3" +dest_files=["res://.godot/imported/gamblecore.mp3-b97531db556457a634a248b9722aaaf7.mp3str"] + +[params] + +loop=true +loop_offset=0.0 +bpm=0.0 +beat_count=0 +bar_beats=4 @@ -1 +1,5 @@ # :3 + +## Outside Resources +- [Cloud Texture](https://www.flickr.com/photos/31288116@N02/3910051966/in/photostream/): Licensed under [Creative Commons Attribution 2.0 Generic](https://creativecommons.org/licenses/by/2.0/) +- [GodotBigNumberClass](https://github.com/ChronoDK/GodotBigNumberClass): [MIT License](https://opensource.org/license/MIT) 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 diff --git a/scenes/main.tscn b/scenes/main.tscn index 770e6db..9191200 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=50 format=3 uid="uid://d06d1vihf2oqp"] +[gd_scene load_steps=52 format=3 uid="uid://d06d1vihf2oqp"] [ext_resource type="Texture2D" uid="uid://b03ygtrwha22g" path="res://taytay/IMG_5199.jpeg" id="1_o2s48"] [ext_resource type="Script" path="res://scenes/main.gd" id="1_y7a0r"] @@ -10,6 +10,8 @@ [ext_resource type="Script" path="res://scenes/score_window/score_window.gd" id="6_gvoxs"] [ext_resource type="Texture2D" uid="uid://dohsqvvi8y64h" path="res://UI/fish-spinning-ezgif.com-gif-to-sprite-converter.png" id="8_oj2tc"] [ext_resource type="PackedScene" uid="uid://c4s4pigu4pr48" path="res://scenes/microgames/fishin/node_2d.tscn" id="10_sx2ad"] +[ext_resource type="AudioStream" uid="uid://di3mxkflh6a3o" path="res://funny_sounds/gamblecore.mp3" id="11_33353"] +[ext_resource type="AudioStream" uid="uid://b45557wwianh8" path="res://funny_sounds/Super Mario 64 (Waaah) - Sound effect.mp3" id="12_xycxa"] [sub_resource type="AtlasTexture" id="AtlasTexture_uyge7"] atlas = ExtResource("8_oj2tc") @@ -339,6 +341,12 @@ $00000000000000000000" position = Vector2(0, 0) scale = Vector2(1, 1) +[node name="Music" type="AudioStreamPlayer" parent="."] +stream = ExtResource("11_33353") + +[node name="LosingSoundEffect" type="AudioStreamPlayer" parent="."] +stream = ExtResource("12_xycxa") + [connection signal="timeout" from="Microgame spawn timer" to="." method="_on_microgame_spawn_timer_timeout"] [connection signal="intro_finished" from="Clippette" to="." method="_on_clippette_intro_finished"] [connection signal="donezo" from="Score window (real)/Score window" to="." method="_on_score_window_donezo"] diff --git a/scenes/microgames/ad/ad_window.gd b/scenes/microgames/ad/ad_window.gd index 3e3fc33..88111a9 100644 --- a/scenes/microgames/ad/ad_window.gd +++ b/scenes/microgames/ad/ad_window.gd @@ -6,6 +6,7 @@ extends "res://scenes/microgames/microgame_window.gd" # Called when the node enters the scene tree for the first time. func _ready() -> void: + # Choose a random ad var all_ads := $"All ads" var sprite := all_ads.get_children().pick_random() as Sprite2D @@ -20,7 +21,6 @@ func _ready() -> void: float(window_size.y) / float(sprite.texture.get_height()) ) - # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass @@ -34,3 +34,9 @@ func _on_close_requested() -> void: func _on_texture_button_pressed() -> void: OS.shell_open("https://www.youtube.com/watch?v=dQw4w9WgXcQ") + lose.emit(self) + + + +func _on_timer_timeout() -> void: + ad_open.emit(self) diff --git a/scenes/microgames/ad/ad_window.tscn b/scenes/microgames/ad/ad_window.tscn index 7c98b6e..1d4d78d 100644 --- a/scenes/microgames/ad/ad_window.tscn +++ b/scenes/microgames/ad/ad_window.tscn @@ -26,7 +26,7 @@ [ext_resource type="Texture2D" uid="uid://diqk5cl2rehkg" path="res://scenes/microgames/ad/ad_images/wizard_sexy.png" id="24_ipkoa"] [ext_resource type="Texture2D" uid="uid://x1m2v51rug76" path="res://scenes/microgames/ad/ad_images/wtf.png" id="25_o5yc3"] -[node name="Window" instance=ExtResource("1_gtv65")] +[node name="Window2" instance=ExtResource("1_gtv65")] title = "Check out this special offer [Click Here]" size = Vector2i(824, 604) content_scale_size = Vector2i(0, 0) @@ -110,4 +110,8 @@ texture = ExtResource("25_o5yc3") offset_right = 1000.0 offset_bottom = 1000.0 +[node name="Timer" type="Timer" parent="." index="2"] +autostart = true + [connection signal="pressed" from="TextureButton" to="." method="_on_texture_button_pressed"] +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/scenes/microgames/fishin/fishin.gd b/scenes/microgames/fishin/fishin.gd index c3d6c78..d52e449 100644 --- a/scenes/microgames/fishin/fishin.gd +++ b/scenes/microgames/fishin/fishin.gd @@ -14,6 +14,7 @@ enum FishType { } signal win(fish_type: FishType) +signal lose signal fish_chosen(fish_sprite: Sprite2D, fish_name: String) const IN_GAME_WAIT_TIME = 10 @@ -200,6 +201,7 @@ func _on_in_game_timeout() -> void: $"Fart".play() get_window().title = "🙂👎" + lose.emit() func _on_success_fail_timeout() -> void: diff --git a/scenes/microgames/microgame_window.gd b/scenes/microgames/microgame_window.gd index 40d3d63..5b44f23 100644 --- a/scenes/microgames/microgame_window.gd +++ b/scenes/microgames/microgame_window.gd @@ -3,6 +3,8 @@ class_name MicrogameWindow signal win(this: MicrogameWindow) +signal lose(this: MicrogameWindow) +signal ad_open(this: MicrogameWindow) func _on_close_requested() -> void: diff --git a/scenes/score_window/score_window.gd b/scenes/score_window/score_window.gd index 76fb983..d6c465d 100644 --- a/scenes/score_window/score_window.gd +++ b/scenes/score_window/score_window.gd @@ -17,7 +17,7 @@ func _ready() -> void: func _process(delta: float) -> void: $Score.text = "Net worth: \n$%s" % net_worth.toString() - if net_worth.isLessThan(Big.new(0)): + if net_worth.isLessThan(Big.new(0)) or net_worth.toString()[0] == '-': donezo.emit() diff --git a/scenes/title.gd b/scenes/title.gd index d5c2159..afb1b34 100644 --- a/scenes/title.gd +++ b/scenes/title.gd @@ -23,6 +23,8 @@ func _on_minimize_button_up() -> void: func _on_start_pressed() -> void: #get_window().size = Vector2(0,0) This messes up the text for some godforesaken reason get_window().position = Vector2(-1000,-1000) + var audio = $AudioStreamPlayer + audio.stop() var new_window = Window.new() new_window.size = Vector2i(1280, 720) |