Cleaned up the Code; reworked the Block Physics

This commit is contained in:
Exobyt 2024-08-27 22:35:24 +02:00
parent ed9f671256
commit 9f6750b08a
48 changed files with 1237 additions and 1116 deletions

View file

@ -1,12 +1,20 @@
extends Control
@onready var score = $VBoxContainer3/VBoxContainer2/ScoreValue
@onready var time = $VBoxContainer3/VBoxContainer/TimeValue
@onready var time = $VBoxContainer3/VBoxContainer/Time
@onready var timeValue = $VBoxContainer3/VBoxContainer/TimeValue
@onready var mode = $VBoxContainer3/VBoxContainer3/ModeValue
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
score.text = str(GLOBAL.points)
time.text = str(GLOBAL.time)
timeValue.text = str(GLOBAL.convertIntToTime(GLOBAL.time))
if GLOBAL.currentMode == GLOBAL.MODES.INFINITE:
time.text = "Time Played"
mode.text = "Infinite"
elif GLOBAL.currentMode == GLOBAL.MODES.TIME:
time.text = "Time Left"
mode.text = "Time"
GLOBAL.resetGame()
func _on_play_again_button_pressed() -> void:

View file

@ -32,6 +32,22 @@ offset_bottom = 182.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer3" type="VBoxContainer" parent="VBoxContainer3"]
layout_mode = 2
alignment = 1
[node name="Mode" type="Label" parent="VBoxContainer3/VBoxContainer3"]
layout_mode = 2
text = "Mode
"
label_settings = ExtResource("2_4dys4")
horizontal_alignment = 1
[node name="ModeValue" type="Label" parent="VBoxContainer3/VBoxContainer3"]
layout_mode = 2
label_settings = ExtResource("4_dfemu")
horizontal_alignment = 1
[node name="VBoxContainer2" type="VBoxContainer" parent="VBoxContainer3"]
layout_mode = 2
alignment = 1