feat: Implement the "Stop N Go" arena with new assets, scenes, and associated game logic and UI.
This commit is contained in:
Binary file not shown.
+23
-7
@@ -83,6 +83,18 @@ func _ready():
|
||||
if pause_settings.pressed.is_connected(_on_settings_pressed):
|
||||
pause_settings.pressed.disconnect(_on_settings_pressed)
|
||||
pause_settings.pressed.connect(_on_settings_pressed)
|
||||
|
||||
# Connect the new top-level Help and Settings buttons
|
||||
var top_help_btn = get_node_or_null("TopMenuUI/HelpBtn")
|
||||
if top_help_btn:
|
||||
if not top_help_btn.pressed.is_connected(_on_how_to_play_pressed):
|
||||
top_help_btn.pressed.connect(_on_how_to_play_pressed)
|
||||
|
||||
# SettingsBtn opens the PauseMenu (acts as a pause/menu toggle)
|
||||
var top_settings_btn = get_node_or_null("TopMenuUI/SettingsBtn")
|
||||
if top_settings_btn:
|
||||
if not top_settings_btn.pressed.is_connected(_toggle_pause_menu):
|
||||
top_settings_btn.pressed.connect(_toggle_pause_menu)
|
||||
|
||||
func _setup_multiplayer_spawners():
|
||||
# Setup MultiplayerSpawner for Static Tekton Stands
|
||||
@@ -199,7 +211,9 @@ func _init_managers():
|
||||
screen_shake_manager.initialize($Camera3D200)
|
||||
|
||||
# Touch controls for mobile
|
||||
touch_controls = get_node_or_null("TouchControls")
|
||||
touch_controls = get_node_or_null("TouchLayer/TouchControls")
|
||||
if not touch_controls:
|
||||
touch_controls = get_node_or_null("TouchControls") # fallback
|
||||
if not touch_controls:
|
||||
print("TouchControls node not found in scene, creating instance...")
|
||||
touch_controls = load("res://scripts/managers/touch_controls.gd").new()
|
||||
@@ -2040,6 +2054,12 @@ func _show_game_over_panel():
|
||||
var actions_btn = get_node_or_null("TouchControls/TouchControls/ActionsBtn")
|
||||
if actions_btn: actions_btn.hide()
|
||||
|
||||
var touch_layer = get_node_or_null("TouchLayer")
|
||||
if touch_layer: touch_layer.hide()
|
||||
|
||||
var top_menu_ui = get_node_or_null("TopMenuUI")
|
||||
if top_menu_ui: top_menu_ui.hide()
|
||||
|
||||
if stop_n_go_manager and stop_n_go_manager.hud_layer:
|
||||
stop_n_go_manager.hud_layer.hide()
|
||||
|
||||
@@ -2485,20 +2505,16 @@ func _on_resume_pressed():
|
||||
# get_tree().paused = false # Removed for multiplayer consistency
|
||||
|
||||
func _on_how_to_play_pressed():
|
||||
var pause_menu = get_node_or_null("PauseMenu")
|
||||
"""Open How To Play panel directly, regardless of where it was called from."""
|
||||
var help_panel = get_node_or_null("HowToPlayPanel")
|
||||
if pause_menu:
|
||||
pause_menu.visible = false
|
||||
if help_panel:
|
||||
help_panel.visible = true
|
||||
|
||||
func _on_how_to_play_back_pressed():
|
||||
var pause_menu = get_node_or_null("PauseMenu")
|
||||
"""Just close the How To Play panel."""
|
||||
var help_panel = get_node_or_null("HowToPlayPanel")
|
||||
if help_panel:
|
||||
help_panel.visible = false
|
||||
if pause_menu:
|
||||
pause_menu.visible = true
|
||||
|
||||
func _on_settings_pressed():
|
||||
var pause_menu = get_node_or_null("PauseMenu")
|
||||
|
||||
+38
-14
@@ -33,6 +33,8 @@
|
||||
[ext_resource type="Texture2D" uid="uid://ikek8mcpeob5" path="res://assets/graphics/gui/rankings/2nd.png" id="28_fuf3a"]
|
||||
[ext_resource type="Texture2D" uid="uid://bowng12514p53" path="res://assets/graphics/gui/rankings/3rd.png" id="29_pibwh"]
|
||||
[ext_resource type="Texture2D" uid="uid://biun2yvglxgij" path="res://assets/graphics/touch_control/grab_tekton.png" id="36_pibwh"]
|
||||
[ext_resource type="Texture2D" uid="uid://bucwm17lfd131" path="res://assets/graphics/gui/help icon.png" id="37_pibwh"]
|
||||
[ext_resource type="Texture2D" uid="uid://da3yx87ar7kcj" path="res://assets/graphics/gui/setting_icon.png" id="38_c6pm6"]
|
||||
[ext_resource type="Script" uid="uid://86ikh0wuqk7v" path="res://scripts/ui/powerup_inventory_ui.gd" id="powerup_ui_script"]
|
||||
[ext_resource type="Script" uid="uid://b54tfa0n6kogi" path="res://scripts/managers/touch_controls.gd" id="touch_manager"]
|
||||
[ext_resource type="Script" uid="uid://djiml4sh61dc1" path="res://scripts/ui/virtual_joystick.gd" id="virtual_joystick"]
|
||||
@@ -93,7 +95,7 @@ content_margin_left = 33.0
|
||||
content_margin_bottom = 20.0
|
||||
texture = SubResource("CompressedTexture2D_chjal")
|
||||
|
||||
[node name="Main" type="Node3D" unique_id=1566673391]
|
||||
[node name="Main" type="Node3D" unique_id=864552263]
|
||||
script = ExtResource("1_xcpe3")
|
||||
|
||||
[node name="EnhancedGridMap" type="GridMap" parent="." unique_id=1838552857]
|
||||
@@ -1639,7 +1641,9 @@ flat = true
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="TouchControls" type="Control" parent="." unique_id=1539594058]
|
||||
[node name="TouchLayer" type="CanvasLayer" parent="." unique_id=1234512345]
|
||||
|
||||
[node name="TouchControls" type="Control" parent="TouchLayer" unique_id=1539594058]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -1651,7 +1655,7 @@ mouse_filter = 2
|
||||
theme = ExtResource("18_pm3ni")
|
||||
script = ExtResource("touch_manager")
|
||||
|
||||
[node name="VirtualJoystick" type="Control" parent="TouchControls" unique_id=1983608919]
|
||||
[node name="VirtualJoystick" type="Control" parent="TouchLayer/TouchControls" unique_id=1983608919]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
@@ -1664,7 +1668,7 @@ offset_bottom = -120.0
|
||||
grow_vertical = 0
|
||||
script = ExtResource("virtual_joystick")
|
||||
|
||||
[node name="PowerBarBtn" type="VBoxContainer" parent="TouchControls" unique_id=278736451]
|
||||
[node name="PowerBarBtn" type="VBoxContainer" parent="TouchLayer/TouchControls" unique_id=278736451]
|
||||
layout_mode = 0
|
||||
offset_left = 56.0
|
||||
offset_top = 117.44364
|
||||
@@ -1673,7 +1677,7 @@ offset_bottom = 284.44363
|
||||
rotation = -0.10297442
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="AttackModeBtn" type="Button" parent="TouchControls/PowerBarBtn" unique_id=1380511463]
|
||||
[node name="AttackModeBtn" type="Button" parent="TouchLayer/TouchControls/PowerBarBtn" unique_id=1380511463]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
@@ -1683,7 +1687,7 @@ flat = true
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="TektonGrabBtn" type="Button" parent="TouchControls/PowerBarBtn" unique_id=2097928368]
|
||||
[node name="TektonGrabBtn" type="Button" parent="TouchLayer/TouchControls/PowerBarBtn" unique_id=2097928368]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
@@ -1692,7 +1696,7 @@ flat = true
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="InteractionBtn" type="VBoxContainer" parent="TouchControls" unique_id=1738242916]
|
||||
[node name="InteractionBtn" type="VBoxContainer" parent="TouchLayer/TouchControls" unique_id=1738242916]
|
||||
layout_mode = 0
|
||||
offset_left = 139.14175
|
||||
offset_top = 108.42897
|
||||
@@ -1701,7 +1705,7 @@ offset_bottom = 275.429
|
||||
rotation = -0.10297442
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="GrabBtn" type="Button" parent="TouchControls/InteractionBtn" unique_id=914810452]
|
||||
[node name="GrabBtn" type="Button" parent="TouchLayer/TouchControls/InteractionBtn" unique_id=914810452]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
@@ -1711,7 +1715,7 @@ flat = true
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="PutBtn" type="Button" parent="TouchControls/InteractionBtn" unique_id=1027790362]
|
||||
[node name="PutBtn" type="Button" parent="TouchLayer/TouchControls/InteractionBtn" unique_id=1027790362]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
@@ -1797,6 +1801,7 @@ layout_mode = 2
|
||||
text = "Resume"
|
||||
|
||||
[node name="HowToPlayBtn" type="Button" parent="PauseMenu/Panel/VBox" unique_id=987654321]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(200, 45)
|
||||
layout_mode = 2
|
||||
text = "How to Play"
|
||||
@@ -2001,18 +2006,37 @@ custom_minimum_size = Vector2(0, 40)
|
||||
layout_mode = 2
|
||||
text = "Back"
|
||||
|
||||
[node name="SettingsBtn" type="Button" parent="." unique_id=1964422444]
|
||||
[node name="TopMenuUI" type="CanvasLayer" parent="." unique_id=1234567890]
|
||||
layer = 2
|
||||
|
||||
[node name="HelpBtn" type="Button" parent="TopMenuUI" unique_id=833886895]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -158.0
|
||||
offset_top = 8.0
|
||||
offset_right = -77.0
|
||||
offset_bottom = 90.0
|
||||
grow_horizontal = 0
|
||||
scale = Vector2(0.75, 0.75)
|
||||
focus_mode = 0
|
||||
icon = ExtResource("37_pibwh")
|
||||
flat = true
|
||||
|
||||
[node name="SettingsBtn" type="Button" parent="TopMenuUI" unique_id=1964422444]
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -78.0
|
||||
offset_top = 8.0
|
||||
offset_right = -30.0
|
||||
offset_bottom = 56.0
|
||||
offset_right = 2.0
|
||||
offset_bottom = 90.0
|
||||
grow_horizontal = 0
|
||||
text = "⚙"
|
||||
scale = Vector2(0.75, 0.75)
|
||||
focus_mode = 0
|
||||
icon = ExtResource("38_c6pm6")
|
||||
flat = true
|
||||
|
||||
[connection signal="text_submitted" from="MessageInput" to="." method="_on_message_input_text_submitted"]
|
||||
[connection signal="pressed" from="PauseMenu/Panel/VBox/ResumeBtn" to="." method="_on_resume_pressed"]
|
||||
[connection signal="pressed" from="PauseMenu/Panel/VBox/HowToPlayBtn" to="." method="_on_how_to_play_pressed"]
|
||||
[connection signal="pressed" from="PauseMenu/Panel/VBox/SettingsBtn" to="." method="_on_settings_pressed"]
|
||||
|
||||
+1
-1
@@ -228,7 +228,7 @@ func _ready():
|
||||
if is_bot or is_in_group("Bots"):
|
||||
# Bots get a unique name based on their Node Name (Bot ID)
|
||||
var bot_id = name.to_int()
|
||||
var bot_names = ["Bot", "Alpha", "Beta", "Gamma", "Delta"]
|
||||
var bot_names = ["Bot", "Alpha", "Beta", "Delta"]
|
||||
var name_idx = (bot_id - 1) % bot_names.size()
|
||||
display_name = "%s %d" % [bot_names[name_idx], bot_id]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user