feat: Implement the core game scene, initializing various managers, multiplayer setup, and dynamic arena elements.
This commit is contained in:
+8
-1
@@ -702,9 +702,10 @@ func _start_game():
|
||||
stop_n_go_manager.setup_mission_tiles()
|
||||
stop_n_go_manager.spawn_initial_powerups() # Ensure power-ups exist before 1,2,3 Go
|
||||
|
||||
# Spawn Static Tektons BEFORE countdown (Free Mode Only)
|
||||
# Spawn Static Tektons and random tiles BEFORE countdown (Free Mode Only)
|
||||
# Exclude for Stop n Go and Tekton Doors
|
||||
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors":
|
||||
randomize_game_grid()
|
||||
spawn_static_tektons()
|
||||
|
||||
# Tekton Doors: Randomize connections BEFORE countdown so colors show
|
||||
@@ -1620,6 +1621,12 @@ func randomize_game_grid():
|
||||
return -1 # Empty
|
||||
|
||||
enhanced_gridmap.randomize_floor(1, density_callable)
|
||||
|
||||
# Sync with all clients immediately
|
||||
if multiplayer.is_server():
|
||||
var grid_data = enhanced_gridmap.get_floor_data(1)
|
||||
rpc("sync_full_grid_data", grid_data)
|
||||
print("[Main] Server: Randomized grid (80%% density) and broadcasted to clients.")
|
||||
|
||||
@rpc("authority", "call_local", "reliable")
|
||||
func sync_full_grid_data_stop_n_go(floor0: PackedInt32Array, floor1: PackedInt32Array, cols: int, rows: int):
|
||||
|
||||
Reference in New Issue
Block a user