update BG, tile

This commit is contained in:
2026-03-10 23:13:24 +08:00
parent d53e4601e4
commit 884ce60cf1
19 changed files with 273 additions and 18 deletions
+30 -1
View File
@@ -61,6 +61,9 @@ func _ready():
# Setup global multiplayer spawners (Stands, etc.)
_setup_multiplayer_spawners()
# Apply Arena Background
_apply_arena_background()
# HUD Settings connection is now handled internally by TouchControlsManager
# which calls _toggle_pause_menu() on this scene.
@@ -86,6 +89,31 @@ func _setup_multiplayer_spawners():
stand_spawner.add_spawnable_scene("res://scenes/static_tekton_stand.tscn")
add_child(stand_spawner)
func _apply_arena_background():
var arena_bg = get_node_or_null("ArenaBG")
if not arena_bg:
return
var selected_area = LobbyManager.get_selected_area()
var texture_path = ""
match selected_area:
"Colloseum":
texture_path = "res://assets/graphics/level_bg/level_bg_colloseum.jpg"
"Stop N Go Arena":
texture_path = "res://assets/graphics/level_bg/placeholder_stop_n_go.jpg"
"Tekton Doors Arena":
texture_path = "res://assets/graphics/level_bg/placeholder_tekton_doors.jpg"
"Classic", _:
texture_path = "res://assets/graphics/level_bg/placeholder_classic.jpg"
if ResourceLoader.exists(texture_path):
var tex = load(texture_path)
if tex:
arena_bg.texture = tex
else:
print("Arena bg texture not found: ", texture_path)
@rpc("any_peer", "call_local", "reliable")
func sync_portal_configs(configs: Array):
if portal_mode_manager:
@@ -2082,9 +2110,10 @@ func _on_back_to_menu_pressed():
"""Return to lobby/main menu and clean up game state."""
print("[Main] Returning to lobby...")
# Clean up game state
# Proper ordered cleanup to avoid ghost players
GameStateManager.end_game()
LobbyManager.reset()
# Properly disconnect from Nakama match
_cleanup_multiplayer()
+7 -1
View File
@@ -33,6 +33,7 @@
[ext_resource type="Texture2D" uid="uid://ckhdyxnho6sjp" path="res://assets/graphics/touch_control/spawn_tile.png" id="28_j8jky"]
[ext_resource type="Texture2D" uid="uid://b2vhatfmufn3d" path="res://assets/graphics/touch_control/ghost.png" id="33_5q0nq"]
[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://u6igejwdutv1" path="res://assets/graphics/level_bg/level_bg_colloseum.jpg" id="37_fuf3a"]
[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"]
@@ -101,7 +102,7 @@ auto_randomize = true
start_item = 2
end_item = 3
immutable_items = Array[int]([4])
metadata/_editor_floor_ = Vector3(0, 1, 0)
metadata/_editor_floor_ = Vector3(0, 0, 0)
[node name="Camera3D" type="Camera3D" parent="." unique_id=1200003163]
transform = Transform3D(1, 0, 0, 0, 0.422618, 0.906308, 0, -0.906308, 0.422618, 7, 22.925, 18.4489)
@@ -10212,6 +10213,11 @@ custom_minimum_size = Vector2(0, 40)
layout_mode = 2
text = "Back"
[node name="ArenaBG" type="Sprite3D" parent="." unique_id=2070634860]
transform = Transform3D(4, 0, 0, 0, 1.8291987, 3.557251, 0, -3.557251, 1.8291987, 6.109789, -30, -4)
texture = ExtResource("37_fuf3a")
region_rect = Rect2(0, 0, 1080, 0)
[connection signal="pressed" from="Menu/Host" to="." method="_on_host_pressed"]
[connection signal="pressed" from="Menu/Join" to="." method="_on_join_pressed"]
[connection signal="text_submitted" from="MessageInput" to="." method="_on_message_input_text_submitted"]