From d41af623741dd3a60ddfb79e94fc00b60308ee06 Mon Sep 17 00:00:00 2001 From: Zoey Kitt Date: Fri, 15 Nov 2024 19:00:30 -0600 Subject: Create microgame spawn timer --- scenes/main.gd | 15 +++++++++++++++ scenes/main.tscn | 14 +++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 scenes/main.gd (limited to 'scenes') diff --git a/scenes/main.gd b/scenes/main.gd new file mode 100644 index 0000000..572ab25 --- /dev/null +++ b/scenes/main.gd @@ -0,0 +1,15 @@ +extends Node2D + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + + +func _on_microgame_spawn_timer_timeout() -> void: + print("WAAAHAHAHA MICROGAMES") diff --git a/scenes/main.tscn b/scenes/main.tscn index 5a4640f..f76412c 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,10 +1,12 @@ -[gd_scene load_steps=4 format=3 uid="uid://d06d1vihf2oqp"] +[gd_scene load_steps=5 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"] [ext_resource type="Script" path="res://scenes/closable_window.gd" id="2_2mdl3"] [ext_resource type="PackedScene" uid="uid://baukkysebggup" path="res://scenes/window_mvp.tscn" id="2_ls66h"] [node name="Node2D" type="Node2D"] +script = ExtResource("1_y7a0r") [node name="Sprite2D" type="Sprite2D" parent="."] position = Vector2(636.307, 381.672) @@ -22,4 +24,14 @@ script = ExtResource("2_2mdl3") [node name="WindowMvp" parent="Window" instance=ExtResource("2_ls66h")] +[node name="Score" type="Label" parent="."] +offset_top = 2.0 +offset_right = 83.0 +offset_bottom = 25.0 +text = "Net worth: $" + +[node name="Microgame spawn timer" type="Timer" parent="."] +autostart = true + [connection signal="close_requested" from="Window" to="Window" method="_on_close_requested"] +[connection signal="timeout" from="Microgame spawn timer" to="." method="_on_microgame_spawn_timer_timeout"] -- cgit v1.2.3