feat: implement new 'Stop N Go' arena scene and manager.

This commit is contained in:
Yogi Wiguna
2026-03-13 11:44:54 +08:00
parent 877a238a82
commit 84ae27c96a
5 changed files with 1083 additions and 217 deletions
+20 -9
View File
@@ -92,8 +92,6 @@ func _setup_multiplayer_spawners():
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 = ""
@@ -103,17 +101,29 @@ func _apply_arena_background():
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"
_instantiate_3d_arena("res://scenes/arena/stop_n_go.scn")
"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)
if arena_bg and texture_path != "":
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)
func _instantiate_3d_arena(scene_path: String):
if ResourceLoader.exists(scene_path):
var arena_scene = load(scene_path)
if arena_scene:
var arena_instance = arena_scene.instantiate()
arena_instance.name = "ArenaEnvironment3D"
add_child(arena_instance)
move_child(arena_instance, 0)
print("Instantiated 3D Arena: ", scene_path)
@rpc("any_peer", "call_local", "reliable")
func sync_portal_configs(configs: Array):
@@ -665,7 +675,8 @@ func _start_game():
# PRE-GAME COUNTDOWN (3s)
# Spawn static obstacles before countdown starts (Stop n Go only)
if obstacle_manager and LobbyManager.game_mode == "Stop n Go":
obstacle_manager.spawn_random_obstacles(15)
# obstacle_manager.spawn_random_obstacles(15) # Disabled: Using fixed obstacles now
pass
# Spawn mission and power-up tiles BEFORE countdown but AFTER walls (Stop n Go only)
if LobbyManager.game_mode == "Stop n Go" and stop_n_go_manager: