Cleaned up the Code; reworked the Block Physics
This commit is contained in:
parent
ed9f671256
commit
9f6750b08a
48 changed files with 1237 additions and 1116 deletions
|
|
@ -20,27 +20,22 @@ func _physics_process(delta: float) -> void:
|
|||
fullscreen = false
|
||||
if scenes.get_children() != []:
|
||||
if GLOBAL.lost and scenes.get_child(0).name == "Grid":
|
||||
scoreOverview()
|
||||
loadScoreOverview()
|
||||
GLOBAL.lost = false
|
||||
|
||||
func loadGrid():
|
||||
if $scenes/ScoreOverview != null:
|
||||
$scenes/ScoreOverview.queue_free()
|
||||
if $scenes/StartMenu != null:
|
||||
$scenes/StartMenu.queue_free()
|
||||
for i in scenes.get_children():
|
||||
i.queue_free()
|
||||
scenes.add_child(load("res://scenes/Grid/grid.tscn").instantiate())
|
||||
$scenes/Grid.toggleButton()
|
||||
$scenes/Grid.startGame()
|
||||
|
||||
func scoreOverview():
|
||||
if $scenes/Grid != null:
|
||||
$scenes/Grid.queue_free()
|
||||
if $scenes/StartMenu != null:
|
||||
$scenes/StartMenu.queue_free()
|
||||
func loadScoreOverview():
|
||||
for i in scenes.get_children():
|
||||
i.queue_free()
|
||||
scenes.add_child(load("res://scenes/ScoreOverview/score_overview.tscn").instantiate())
|
||||
|
||||
func loadStartMenu():
|
||||
if $scenes/ScoreOverview != null:
|
||||
$scenes/ScoreOverview.queue_free()
|
||||
if $scenes/Grid != null:
|
||||
$scenes/Grid.queue_free()
|
||||
for i in scenes.get_children():
|
||||
i.queue_free()
|
||||
scenes.add_child(load("res://scenes/Menu/start_menu.tscn").instantiate())
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ position = Vector2(3195.96, 14.0137)
|
|||
scale = Vector2(0.501878, 0.054741)
|
||||
amount = 50
|
||||
lifetime = 5.0
|
||||
preprocess = 5.0
|
||||
preprocess = 20.0
|
||||
speed_scale = 0.5
|
||||
local_coords = true
|
||||
texture = ExtResource("2_5ae6b")
|
||||
|
|
@ -47,7 +47,7 @@ position = Vector2(3195.96, 14.0137)
|
|||
scale = Vector2(0.501878, 0.054741)
|
||||
amount = 50
|
||||
lifetime = 5.0
|
||||
preprocess = 5.0
|
||||
preprocess = 20.0
|
||||
speed_scale = 0.5
|
||||
local_coords = true
|
||||
texture = ExtResource("2_5ae6b")
|
||||
|
|
@ -68,7 +68,7 @@ position = Vector2(3195.96, 14.0137)
|
|||
scale = Vector2(0.501878, 0.054741)
|
||||
amount = 50
|
||||
lifetime = 5.0
|
||||
preprocess = 5.0
|
||||
preprocess = 20.0
|
||||
speed_scale = 0.5
|
||||
local_coords = true
|
||||
texture = ExtResource("2_5ae6b")
|
||||
|
|
@ -89,7 +89,7 @@ position = Vector2(3195.96, 14.0137)
|
|||
scale = Vector2(0.501878, 0.054741)
|
||||
amount = 50
|
||||
lifetime = 5.0
|
||||
preprocess = 5.0
|
||||
preprocess = 20.0
|
||||
speed_scale = 0.5
|
||||
local_coords = true
|
||||
texture = ExtResource("2_5ae6b")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue