Added Infinite Mode; Improved Timer

This commit is contained in:
Exobyt 2024-08-22 23:46:07 +02:00
parent 1245ebc9e8
commit ed9f671256
9 changed files with 109 additions and 44 deletions

View file

@ -11,5 +11,10 @@ func _process(delta: float) -> void:
pass
func _on_start_button_pressed() -> void:
func _on_infinite_mode_button_pressed() -> void:
GLOBAL.currentMode = GLOBAL.MODES.INFINITE
get_parent().get_parent().loadGrid()
func _on_time_mode_button_pressed() -> void:
GLOBAL.currentMode = GLOBAL.MODES.TIME
get_parent().get_parent().loadGrid()

View file

@ -19,7 +19,7 @@ grow_vertical = 2
theme = ExtResource("1_t0oee")
script = ExtResource("2_1x51p")
[node name="StartButton" type="Button" parent="."]
[node name="VBoxContainer2" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
@ -27,13 +27,19 @@ anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -156.0
offset_top = -320.0
offset_right = 4.0
offset_bottom = -224.0
offset_top = -448.0
offset_right = 164.0
offset_bottom = -256.0
grow_horizontal = 2
grow_vertical = 0
scale = Vector2(2, 2)
text = "Start"
[node name="InfiniteModeButton" type="Button" parent="VBoxContainer2"]
layout_mode = 2
text = "Infinite Mode"
[node name="TimeModeButton" type="Button" parent="VBoxContainer2"]
layout_mode = 2
text = "Time Mode"
[node name="Label" type="Label" parent="."]
layout_mode = 1
@ -111,4 +117,5 @@ alignment = 1
layout_mode = 2
texture = ExtResource("7_mn4r0")
[connection signal="pressed" from="StartButton" to="." method="_on_start_button_pressed"]
[connection signal="pressed" from="VBoxContainer2/InfiniteModeButton" to="." method="_on_infinite_mode_button_pressed"]
[connection signal="pressed" from="VBoxContainer2/TimeModeButton" to="." method="_on_time_mode_button_pressed"]