feat: Implement core game systems including settings management, player input, and initial gameplay mechanics with associated UI.
This commit is contained in:
@@ -1161,24 +1161,20 @@ grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="ActionButtonContainer" type="VBoxContainer" parent="ActionMenu" unique_id=1026460846]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="MoveButton" type="Button" parent="ActionMenu/ActionButtonContainer" unique_id=1233901451]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Move"
|
||||
|
||||
[node name="GrabButton" type="Button" parent="ActionMenu/ActionButtonContainer" unique_id=1584219139]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
layout_mode = 2
|
||||
text = "Grab"
|
||||
|
||||
[node name="PutButton" type="Button" parent="ActionMenu/ActionButtonContainer" unique_id=508990607]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
layout_mode = 2
|
||||
text = "Put"
|
||||
|
||||
+14
-8
@@ -1012,6 +1012,20 @@ func activate_powerup(effect_id: int):
|
||||
if st_manager:
|
||||
st_manager.activate_effect(effect_id)
|
||||
|
||||
func activate_held_powerup():
|
||||
"""Finds whichever powerup is currently held and activates it."""
|
||||
var active_effect = -1
|
||||
if special_tiles_manager:
|
||||
for effect_key in special_tiles_manager.inventory:
|
||||
if special_tiles_manager.inventory[effect_key]:
|
||||
active_effect = effect_key
|
||||
break
|
||||
|
||||
if active_effect != -1:
|
||||
activate_powerup(active_effect)
|
||||
else:
|
||||
print("[Player] No powerup currently held to activate.")
|
||||
|
||||
|
||||
func _process(delta):
|
||||
# Failsafe: Ensure player is visible if spawn point is selected and random spawn is active
|
||||
@@ -1118,14 +1132,6 @@ func _physics_process(delta):
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
func _unhandled_input(event):
|
||||
# Handle power-up usage
|
||||
if event.is_action_pressed("use_powerup") and is_multiplayer_authority():
|
||||
if is_frozen or is_stop_frozen:
|
||||
return
|
||||
if powerup_manager and powerup_manager.can_use_special():
|
||||
powerup_manager.use_special_effect()
|
||||
return
|
||||
|
||||
if input_manager:
|
||||
input_manager.handle_unhandled_input(event)
|
||||
|
||||
|
||||
@@ -300,7 +300,22 @@ label_settings = SubResource("LabelSettings_section")
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 20
|
||||
theme_override_constants/v_separation = 10
|
||||
columns = 2
|
||||
columns = 3
|
||||
|
||||
[node name="ColH1" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid"]
|
||||
layout_mode = 2
|
||||
text = "Action"
|
||||
label_settings = SubResource("LabelSettings_section")
|
||||
|
||||
[node name="ColH2" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid"]
|
||||
layout_mode = 2
|
||||
text = "Primary"
|
||||
label_settings = SubResource("LabelSettings_section")
|
||||
|
||||
[node name="ColH3" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid"]
|
||||
layout_mode = 2
|
||||
text = "Secondary"
|
||||
label_settings = SubResource("LabelSettings_section")
|
||||
|
||||
[node name="UpLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000007]
|
||||
layout_mode = 2
|
||||
@@ -314,6 +329,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "W"
|
||||
|
||||
[node name="MoveUpAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000108]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "Up"
|
||||
|
||||
[node name="DownLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000009]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -326,6 +347,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "S"
|
||||
|
||||
[node name="MoveDownAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000110]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "Down"
|
||||
|
||||
[node name="LeftLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000011]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -338,6 +365,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "A"
|
||||
|
||||
[node name="MoveLeftAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000112]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "Left"
|
||||
|
||||
[node name="RightLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000013]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -350,6 +383,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "D"
|
||||
|
||||
[node name="MoveRightAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/MoveGrid" unique_id=100000114]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "Right"
|
||||
|
||||
[node name="PowerUpSection" type="PanelContainer" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox" unique_id=100000015]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_section_header")
|
||||
@@ -363,55 +402,25 @@ label_settings = SubResource("LabelSettings_section")
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 20
|
||||
theme_override_constants/v_separation = 10
|
||||
columns = 2
|
||||
columns = 3
|
||||
|
||||
[node name="P1Label" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000018]
|
||||
[node name="UsePowerupLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000118]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "PowerUp 1 (Speed)"
|
||||
text = "Activate PowerUp (Universal)"
|
||||
label_settings = SubResource("LabelSettings_heading")
|
||||
|
||||
[node name="Powerup1Btn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000019]
|
||||
[node name="UsePowerupBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000119]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "1"
|
||||
text = "F"
|
||||
|
||||
[node name="P2Label" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000020]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "PowerUp 2 (Freeze/Ghost)"
|
||||
label_settings = SubResource("LabelSettings_heading")
|
||||
|
||||
[node name="Powerup2Btn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000021]
|
||||
[node name="UsePowerupAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000120]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "2"
|
||||
|
||||
[node name="P3Label" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000022]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "PowerUp 3 (Wall)"
|
||||
label_settings = SubResource("LabelSettings_heading")
|
||||
|
||||
[node name="Powerup3Btn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000023]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "3"
|
||||
|
||||
[node name="P4Label" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000024]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "PowerUp 4 (Ghost)"
|
||||
label_settings = SubResource("LabelSettings_heading")
|
||||
|
||||
[node name="Powerup4Btn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerUpGrid" unique_id=100000025]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "4"
|
||||
text = "N/A"
|
||||
|
||||
[node name="PowerBarSection" type="PanelContainer" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox" unique_id=100000026]
|
||||
layout_mode = 2
|
||||
@@ -426,7 +435,7 @@ label_settings = SubResource("LabelSettings_section")
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 20
|
||||
theme_override_constants/v_separation = 10
|
||||
columns = 2
|
||||
columns = 3
|
||||
|
||||
[node name="AttackLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerBarGrid" unique_id=100000029]
|
||||
layout_mode = 2
|
||||
@@ -440,6 +449,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "Q"
|
||||
|
||||
[node name="AttackModeAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerBarGrid" unique_id=100000130]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "N/A"
|
||||
|
||||
[node name="SpawnBoostLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerBarGrid" unique_id=100000031]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -452,6 +467,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "E"
|
||||
|
||||
[node name="SpawnBoostAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/PowerBarGrid" unique_id=100000132]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "N/A"
|
||||
|
||||
[node name="OtherSection" type="PanelContainer" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox" unique_id=100000033]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_section_header")
|
||||
@@ -465,7 +486,7 @@ label_settings = SubResource("LabelSettings_section")
|
||||
layout_mode = 2
|
||||
theme_override_constants/h_separation = 20
|
||||
theme_override_constants/v_separation = 10
|
||||
columns = 2
|
||||
columns = 3
|
||||
|
||||
[node name="GrabLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/OtherGrid" unique_id=100000036]
|
||||
layout_mode = 2
|
||||
@@ -479,6 +500,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "Space"
|
||||
|
||||
[node name="GrabAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/OtherGrid" unique_id=100000137]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "N/A"
|
||||
|
||||
[node name="PutLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/OtherGrid" unique_id=100000038]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -491,6 +518,12 @@ custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "R"
|
||||
|
||||
[node name="PutAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/OtherGrid" unique_id=100000139]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "N/A"
|
||||
|
||||
[node name="TektonGrabLabel" type="Label" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/OtherGrid" unique_id=100000040]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -502,3 +535,9 @@ unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "G"
|
||||
|
||||
[node name="TektonGrabAltBtn" type="Button" parent="PanelContainer/VBoxContainer/ContentSection/TabContainer/Controls/VBox/OtherGrid" unique_id=100000141]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(150, 40)
|
||||
layout_mode = 2
|
||||
text = "N/A"
|
||||
|
||||
Reference in New Issue
Block a user