summaryrefslogtreecommitdiff
path: root/scenes
diff options
context:
space:
mode:
authorZoey Kitt <zoey.kitt@outlook.com>2024-11-16 20:45:46 -0600
committerZoey Kitt <zoey.kitt@outlook.com>2024-11-16 20:45:46 -0600
commit05edc5e0909db8b4d48c971c8b2680a71997bb1f (patch)
tree075014d60924feabc143bb1f01e13f2e29bb7515 /scenes
parent73f8e11d939ffbffbc7e7fc96673d09f28c90647 (diff)
parent68459cebbc082aef2cab614608cd605e7cf54b5f (diff)
Merge branch 'main-window'
Diffstat (limited to 'scenes')
-rw-r--r--scenes/main.gd25
-rw-r--r--scenes/main.tscn62
-rw-r--r--scenes/microgames/fishin/fishin.gd19
-rw-r--r--scenes/microgames/fishin/node_2d.tscn53
-rw-r--r--scenes/score_window/score_window.gd24
-rw-r--r--scenes/stockticker/Stock Ticker.tscn3
-rw-r--r--scenes/stockticker/transactions.gd4
7 files changed, 127 insertions, 63 deletions
diff --git a/scenes/main.gd b/scenes/main.gd
index 4f1c67f..7ab90d5 100644
--- a/scenes/main.gd
+++ b/scenes/main.gd
@@ -1,23 +1,15 @@
extends Node2D
-var net_worth: Big
-
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
- _on_microgame_spawn_timer_timeout()
- net_worth = Big.new(1000)
+ pass
- var window = get_window()
- window.position = Vector2(450, 360)
- window.size = Vector2(1319, 300)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
# The most important functionality
if Input.is_action_just_pressed("G"):
$Meow.play()
-
- $Score.text = "Net worth: \n$%s" % net_worth.toString()
func _on_microgame_spawn_timer_timeout() -> void:
@@ -26,6 +18,9 @@ func _on_microgame_spawn_timer_timeout() -> void:
# Spawn a microgame window
var window_scene = preload("res://scenes/microgames/ad/ad_window.tscn")
var window_instance = window_scene.instantiate()
+
+ print(type_string(typeof(window_instance)))
+
add_child(window_instance)
# Randomize window position
@@ -42,9 +37,9 @@ func _on_microgame_win(window: MicrogameWindow):
print("yay")
-func _on_stock_ticker_buy(amount: Variant) -> void:
- net_worth = net_worth.minus(amount)
-
-
-func _on_stock_ticker_sell(amount: Variant) -> void:
- net_worth = net_worth.plus(amount)
+func _on_fishin_win() -> void:
+ $Fishin.visible = false
+ $"Stock ticker".start()
+ $"Microgame spawn timer".start()
+ $Clippette.visible = true
+ $"Score window (real)".visible = true
diff --git a/scenes/main.tscn b/scenes/main.tscn
index a4504b9..fa0bfb2 100644
--- a/scenes/main.tscn
+++ b/scenes/main.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=48 format=3 uid="uid://d06d1vihf2oqp"]
+[gd_scene load_steps=50 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"]
@@ -7,7 +7,9 @@
[ext_resource type="AudioStream" uid="uid://wtoxhk0tf8ev" path="res://funny_sounds/Cat Meow - Minecraft Sound Effect (HD).mp3" id="3_gatxj"]
[ext_resource type="PackedScene" uid="uid://g2veoq55y14i" path="res://scenes/stockticker/Stock Ticker.tscn" id="4_0ankd"]
[ext_resource type="PackedScene" uid="uid://bbg7lnak6kup7" path="res://scenes/LegallyDistinctPaperclipAssistant/window.tscn" id="5_6agvn"]
+[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"]
[sub_resource type="AtlasTexture" id="AtlasTexture_uyge7"]
atlas = ExtResource("8_oj2tc")
@@ -286,51 +288,55 @@ animations = [{
[node name="Node2D2" type="Node2D"]
script = ExtResource("1_y7a0r")
-[node name="Background" type="Sprite2D" parent="."]
-modulate = Color(0.796078, 0.796078, 0.796078, 1)
-light_mask = 3
-scale = Vector2(1319, 300)
-texture = ExtResource("2_fkfik")
-centered = false
-
[node name="Sprite2D" type="Sprite2D" parent="."]
visible = false
position = Vector2(636.307, 381.672)
scale = Vector2(0.293995, 0.217148)
texture = ExtResource("1_o2s48")
-[node name="Score" type="Label" parent="."]
-offset_top = 2.0
-offset_right = 83.0
-offset_bottom = 25.0
-theme = ExtResource("3_d7ku7")
-theme_override_colors/font_color = Color(0, 0, 0, 1)
-theme_override_font_sizes/font_size = 62
-text = "Net worth:
-
-$00000000000000000000"
-
[node name="Microgame spawn timer" type="Timer" parent="."]
wait_time = 10.0
-autostart = true
[node name="Meow" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_gatxj")
-[node name="Stock ticker window" type="Window" parent="."]
-position = Vector2i(1000, 342)
-size = Vector2i(1280, 720)
+[node name="Clippette" parent="." instance=ExtResource("5_6agvn")]
+visible = false
+
+[node name="Score window (real)" type="Window" parent="."]
+visible = false
-[node name="Stock ticker" parent="Stock ticker window" instance=ExtResource("4_0ankd")]
+[node name="Score window" type="Node2D" parent="Score window (real)"]
+script = ExtResource("6_gvoxs")
-[node name="Clippette" parent="." instance=ExtResource("5_6agvn")]
+[node name="Background" type="Sprite2D" parent="Score window (real)/Score window"]
+modulate = Color(0.796078, 0.796078, 0.796078, 1)
+light_mask = 3
+scale = Vector2(1319, 300)
+texture = ExtResource("2_fkfik")
+centered = false
-[node name="Rotating fish" type="AnimatedSprite2D" parent="."]
+[node name="Rotating fish" type="AnimatedSprite2D" parent="Score window (real)/Score window"]
position = Vector2(1060, 149)
sprite_frames = SubResource("SpriteFrames_ke268")
autoplay = "default"
frame_progress = 0.387952
+[node name="Score" type="Label" parent="Score window (real)/Score window"]
+offset_top = 2.0
+offset_right = 1302.0
+offset_bottom = 197.0
+theme = ExtResource("3_d7ku7")
+theme_override_colors/font_color = Color(0, 0, 0, 1)
+theme_override_font_sizes/font_size = 62
+text = "Net worth:
+
+$00000000000000000000"
+
+[node name="Stock ticker" parent="." instance=ExtResource("4_0ankd")]
+
+[node name="Fishin" parent="." instance=ExtResource("10_sx2ad")]
+position = Vector2(0, 0)
+
[connection signal="timeout" from="Microgame spawn timer" to="." method="_on_microgame_spawn_timer_timeout"]
-[connection signal="buy" from="Stock ticker window/Stock ticker" to="." method="_on_stock_ticker_buy"]
-[connection signal="sell" from="Stock ticker window/Stock ticker" to="." method="_on_stock_ticker_sell"]
+[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 44b60db..3a7a704 100644
--- a/scenes/microgames/fishin/fishin.gd
+++ b/scenes/microgames/fishin/fishin.gd
@@ -1,4 +1,6 @@
-extends MicrogameWindow
+extends Node2D
+
+signal win
const IN_GAME_WAIT_TIME = 10
@@ -13,7 +15,9 @@ var shake2: ShakePivot
var shake3: ShakePivot
var start_game_timer: Timer
var in_game_timer: Timer
-var succfail_timer: Timer
+# This used to mean "success/failure" but now means "you succ, failure"
+var succfail_timer: Timer
+var success_timer: Timer
var in_minigame = false
var num_clicks = 0
@@ -32,6 +36,7 @@ func _ready() -> void:
start_game_timer = $StartGame
in_game_timer = $InGame
succfail_timer = $SuccessFail
+ success_timer = $Success
# Called every frame. 'delta' is the elapsed time since the previous frame.
@@ -63,7 +68,8 @@ func _on_texture_button_button_up() -> void:
in_game_timer.stop()
in_game_timer.wait_time = IN_GAME_WAIT_TIME
- succfail_timer.start()
+ success_timer.start()
+ $"Yippee!".play()
func _on_start_game_timeout() -> void:
@@ -84,7 +90,7 @@ func _on_start_game_timeout() -> void:
mouse.visible = true
num_clicks = randi_range(5,21)
- num_clicks = 21
+ #num_clicks = 21
# YOU LOSE
@@ -103,6 +109,7 @@ func _on_in_game_timeout() -> void:
in_game_timer.stop()
succfail_timer.start()
+ $"Fart".play()
func _on_success_fail_timeout() -> void:
@@ -111,3 +118,7 @@ func _on_success_fail_timeout() -> void:
you.visible = true
succfail_timer.stop()
start_game_timer.start()
+
+
+func _on_success_timeout() -> void:
+ win.emit()
diff --git a/scenes/microgames/fishin/node_2d.tscn b/scenes/microgames/fishin/node_2d.tscn
index 969ec34..5dc8da7 100644
--- a/scenes/microgames/fishin/node_2d.tscn
+++ b/scenes/microgames/fishin/node_2d.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=14 format=3 uid="uid://c4s4pigu4pr48"]
+[gd_scene load_steps=17 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"]
@@ -10,6 +10,9 @@
[ext_resource type="Script" path="res://libs/shake_pivot.gd" id="7_vnrfy"]
[ext_resource type="Texture2D" uid="uid://d4kyih3ivlqqc" path="res://scenes/microgames/fishin/KibbbySad.png" id="9_blola"]
[ext_resource type="Texture2D" uid="uid://dcvie7ynwdfui" path="res://scenes/microgames/fishin/KibbbyHappy.png" id="10_1il5r"]
+[ext_resource type="Texture2D" uid="uid://dpp7abs35p6i5" path="res://scenes/stockticker/fishe/gar.png" id="11_gjj1w"]
+[ext_resource type="AudioStream" uid="uid://c6021mckr08w5" path="res://funny_sounds/Yippee - Meme Sound Effect.mp3" id="12_4oxp1"]
+[ext_resource type="AudioStream" uid="uid://beunakwyi8i82" path="res://funny_sounds/ROBLOX Oof Sound Effect.mp3" id="13_kxv5l"]
[sub_resource type="Animation" id="Animation_bep6n"]
length = 0.001
@@ -48,10 +51,8 @@ _data = {
"mash": SubResource("Animation_fxbt5")
}
-[node name="Node2D2" type="Window"]
-position = Vector2i(0, 36)
-size = Vector2i(930, 560)
-unresizable = true
+[node name="Fishin" type="Node2D"]
+position = Vector2(0, 36)
script = ExtResource("1_srw8b")
[node name="background" type="Sprite2D" parent="."]
@@ -61,7 +62,7 @@ scale = Vector2(1300.5, 725.5)
texture = ExtResource("1_cxqat")
[node name="you!" type="Sprite2D" parent="."]
-position = Vector2(535, 300)
+position = Vector2(665, 458)
texture = ExtResource("2_atppo")
[node name="TextureButton" type="TextureButton" parent="."]
@@ -80,7 +81,7 @@ script = ExtResource("7_vnrfy")
[node name="pulling" type="Sprite2D" parent="ShakePivot"]
visible = false
-position = Vector2(535, 300)
+position = Vector2(665, 458)
texture = ExtResource("3_don82")
[node name="ShakePivot2" type="Node2D" parent="."]
@@ -88,10 +89,10 @@ script = ExtResource("7_vnrfy")
[node name="MASH" type="Label" parent="ShakePivot2"]
visible = false
-offset_left = 150.0
-offset_top = 358.0
-offset_right = 570.0
-offset_bottom = 598.0
+offset_left = 286.0
+offset_top = 463.0
+offset_right = 706.0
+offset_bottom = 703.0
theme = ExtResource("5_7qce4")
theme_override_colors/font_color = Color(1, 0, 0, 1)
theme_override_font_sizes/font_size = 60
@@ -102,7 +103,7 @@ script = ExtResource("7_vnrfy")
[node name="Mouse" type="Sprite2D" parent="ShakePivot3"]
visible = false
-position = Vector2(412, 532)
+position = Vector2(548, 637)
scale = Vector2(0.216276, 0.249769)
[node name="StartGame" type="Timer" parent="."]
@@ -113,18 +114,42 @@ wait_time = 3.0
[node name="SAD" type="Sprite2D" parent="."]
visible = false
-position = Vector2(535, 300)
+position = Vector2(665, 458)
texture = ExtResource("9_blola")
[node name="Happy" type="Sprite2D" parent="."]
visible = false
-position = Vector2(535, 300)
+position = Vector2(665, 458)
texture = ExtResource("10_1il5r")
+[node name="Catch" type="Sprite2D" parent="Happy"]
+position = Vector2(-385, 50)
+scale = Vector2(0.475, 0.492)
+texture = ExtResource("11_gjj1w")
+
+[node name="Victory message" type="Label" parent="Happy"]
+offset_left = -479.0
+offset_top = -398.0
+offset_right = 481.0
+offset_bottom = -334.0
+theme = ExtResource("5_7qce4")
+theme_override_font_sizes/font_size = 64
+text = "You caught GAR!"
+
[node name="SuccessFail" type="Timer" parent="."]
wait_time = 3.0
+[node name="Success" type="Timer" parent="."]
+wait_time = 3.0
+
+[node name="Yippee!" type="AudioStreamPlayer" parent="."]
+stream = ExtResource("12_4oxp1")
+
+[node name="Fart" type="AudioStreamPlayer" parent="."]
+stream = ExtResource("13_kxv5l")
+
[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"]
[connection signal="timeout" from="SuccessFail" to="." method="_on_success_fail_timeout"]
+[connection signal="timeout" from="Success" to="." method="_on_success_timeout"]
diff --git a/scenes/score_window/score_window.gd b/scenes/score_window/score_window.gd
new file mode 100644
index 0000000..f4159af
--- /dev/null
+++ b/scenes/score_window/score_window.gd
@@ -0,0 +1,24 @@
+extends Node2D
+
+var net_worth: Big
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ net_worth = Big.new(1000)
+
+ var window = get_window()
+ window.position = Vector2(450, 360)
+ window.size = Vector2(1319, 300)
+
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(delta: float) -> void:
+ $Score.text = "Net worth: \n$%s" % net_worth.toString()
+
+
+func _on_stock_ticker_buy(amount: Variant) -> void:
+ net_worth = net_worth.minus(amount)
+
+
+func _on_stock_ticker_sell(amount: Variant) -> void:
+ net_worth = net_worth.plus(amount)
diff --git a/scenes/stockticker/Stock Ticker.tscn b/scenes/stockticker/Stock Ticker.tscn
index f2b2ec6..6afa1af 100644
--- a/scenes/stockticker/Stock Ticker.tscn
+++ b/scenes/stockticker/Stock Ticker.tscn
@@ -19,11 +19,10 @@ script = ExtResource("1_1gmdn")
[node name="Background" type="Sprite2D" parent="."]
modulate = Color(0.796078, 0.796078, 0.796078, 1)
position = Vector2(639.75, 359.75)
-scale = Vector2(1280.5, 720.5)
+scale = Vector2(1280, 720)
texture = ExtResource("1_wbfee")
[node name="Timer" type="Timer" parent="."]
-autostart = true
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(1036, 555)
diff --git a/scenes/stockticker/transactions.gd b/scenes/stockticker/transactions.gd
index daff901..39e25b9 100644
--- a/scenes/stockticker/transactions.gd
+++ b/scenes/stockticker/transactions.gd
@@ -15,3 +15,7 @@ func _on_stonks_sell(amount: Variant) -> void:
print("+$%s" % amount.toString())
sell.emit(amount)
+
+# Scope creep!
+func start():
+ $Timer.start()