diff --git a/HUD.tscn b/HUD.tscn index 6332776..4de439e 100644 --- a/HUD.tscn +++ b/HUD.tscn @@ -92,20 +92,36 @@ margin_right = 291.36 margin_bottom = 23.0 script = ExtResource( 1 ) -[node name="SlapLabel" type="Label" parent="PlayerLayer/ActualHUD/SlapGauge"] +[node name="SlapLabel" type="Label" parent="PlayerLayer/ActualHUD"] modulate = Color( 1, 1, 1, 0.611765 ) anchor_left = 12.662 anchor_top = 7.324 anchor_right = 12.662 anchor_bottom = 7.324 -margin_left = -3683.2 -margin_top = -169.452 -margin_right = -3572.2 -margin_bottom = -137.452 +margin_left = -500.48 +margin_top = -309.78 +margin_right = -389.48 +margin_bottom = -277.78 text = "Slap" +[node name="Remaining" type="Label" parent="PlayerLayer/ActualHUD"] +margin_left = 5.96 +margin_top = -30.12 +margin_right = 140.96 +margin_bottom = -8.12 +text = "Remaining balls:" + +[node name="Balls" type="Label" parent="PlayerLayer/ActualHUD"] +margin_left = 139.96 +margin_top = -29.12 +margin_right = 281.96 +margin_bottom = -7.12 +text = "0" +align = 2 + [node name="MenuLayer" type="CanvasLayer" parent="."] layer = 2 +visible = false [node name="Background" type="ColorRect" parent="MenuLayer"] margin_left = -4.0 diff --git a/Levels/Level01.gd b/Levels/Level01.gd index 3929d16..6c946f7 100644 --- a/Levels/Level01.gd +++ b/Levels/Level01.gd @@ -6,14 +6,15 @@ onready var NEXTSCENE = "res://Levels/Level02.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() diff --git a/Levels/Level02.gd b/Levels/Level02.gd index 59e6bdc..eccf918 100644 --- a/Levels/Level02.gd +++ b/Levels/Level02.gd @@ -10,19 +10,19 @@ onready var NEXTSCENE = "res://Levels/Level03.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() - func _on_Win_timeout(): get_tree().change_scene(NEXTSCENE) diff --git a/Levels/Level03.gd b/Levels/Level03.gd index e686e11..74be360 100644 --- a/Levels/Level03.gd +++ b/Levels/Level03.gd @@ -10,19 +10,20 @@ onready var NEXTSCENE = "res://Levels/Level04.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. + +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() - func _on_Win_timeout(): get_tree().change_scene(NEXTSCENE) diff --git a/Levels/Level04.gd b/Levels/Level04.gd index 58da723..e0c0c2a 100644 --- a/Levels/Level04.gd +++ b/Levels/Level04.gd @@ -10,14 +10,15 @@ onready var NEXTSCENE = "res://Levels/Level05.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() diff --git a/Levels/Level05.gd b/Levels/Level05.gd index a48c4bb..1688d0e 100644 --- a/Levels/Level05.gd +++ b/Levels/Level05.gd @@ -10,14 +10,15 @@ onready var NEXTSCENE = "res://Levels/Level06.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() diff --git a/Levels/Level06.gd b/Levels/Level06.gd index 9f2a065..a4d6665 100644 --- a/Levels/Level06.gd +++ b/Levels/Level06.gd @@ -7,10 +7,13 @@ onready var WinMess = $Messages/Win onready var EndTimer = $End onready var FirstTime = $Timer -onready var HUD = $"Player/HUD/MenuLayer/Start" +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" +onready var rem = $"Player/HUD/PlayerLayer/ActualHUD/Remaining" func _ready(): FirstTime.start() + balls.hide() + rem.hide() func _on_Enemy_dying(): diff --git a/Levels/Level07.gd b/Levels/Level07.gd index 20f6d2a..789713f 100644 --- a/Levels/Level07.gd +++ b/Levels/Level07.gd @@ -10,14 +10,15 @@ onready var NEXTSCENE = "res://Levels/Level08.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() diff --git a/Levels/Level08.gd b/Levels/Level08.gd index a3d2a41..1b144df 100644 --- a/Levels/Level08.gd +++ b/Levels/Level08.gd @@ -10,14 +10,15 @@ onready var NEXTSCENE = "res://Levels/Level09.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() diff --git a/Levels/Level09.gd b/Levels/Level09.gd index 642a477..a68a903 100644 --- a/Levels/Level09.gd +++ b/Levels/Level09.gd @@ -10,14 +10,15 @@ onready var NEXTSCENE = "res://Scenes/End.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() diff --git a/Levels/Level09.tscn b/Levels/Level09.tscn index 9922539..a9d6983 100644 --- a/Levels/Level09.tscn +++ b/Levels/Level09.tscn @@ -209,9 +209,9 @@ height = 35.4425 depth = 81.4166 [node name="CSGBox31" type="CSGBox" parent="CSGCombiner"] -transform = Transform( 0.999998, 0, 0, 0, 1, 0, 0, 0, 0.999998, -67.9928, 13.2378, -136.402 ) +transform = Transform( 0.999998, 0, 0, 0, 1, 0, 0, 0, 0.999998, -68.0095, 13.2378, -67.8662 ) height = 35.4425 -depth = 384.791 +depth = 255.49 [node name="CSGBox32" type="CSGBox" parent="CSGCombiner"] transform = Transform( -0.000544563, 0.000190083, 0.999997, -0.777923, 0.628357, -0.000543069, -0.628355, -0.777925, -0.00019431, -60.3016, 6.78922, -91.6615 ) @@ -273,8 +273,7 @@ transform = Transform( 0.995641, 0, 0, 0, 0.995641, 0, 0, 0, 0.995641, 16.6179, transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.8966, -7.28051, -160.061 ) stream = ExtResource( 6 ) attenuation_model = 2 -unit_db = 80.0 -max_db = 6.0 +unit_db = 60.0 autoplay = true bus = "SFX" diff --git a/Levels/Level10.gd b/Levels/Level10.gd index 464717d..09ec2e7 100644 --- a/Levels/Level10.gd +++ b/Levels/Level10.gd @@ -10,19 +10,19 @@ onready var NEXTSCENE = "res://Levels/Level11.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start() - func _on_Win_timeout(): get_tree().change_scene(NEXTSCENE) diff --git a/Levels/Level11.gd b/Levels/Level11.gd index eb81547..28fccf5 100644 --- a/Levels/Level11.gd +++ b/Levels/Level11.gd @@ -10,14 +10,15 @@ onready var NEXTSCENE = "res://End.tscn" onready var WinMess = $Messages/Win onready var EndTimer = $End -onready var HUD = $"Player/HUD/MenuLayer/Start" -# Called when the node enters the scene tree for the first time. +onready var balls = $"Player/HUD/PlayerLayer/ActualHUD/Balls" + func _ready(): - pass # Replace with function body. + balls.text = String(enemycount) func _on_Enemy_dying(): enemycount -= 1 + balls.text = String(enemycount) if enemycount == 0: WinMess.show() EndTimer.start()