Create microgame spawn timer

This commit is contained in:
Zoey Kitt 2024-11-15 19:00:30 -06:00
parent 7a468e6365
commit d41af62374
2 changed files with 28 additions and 1 deletions

15
scenes/main.gd Normal file
View file

@ -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")

View file

@ -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"]