update BG, tile
This commit is contained in:
+30
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user