feat: Implement Portal Doors game mode with arena setup, dynamic portal connections, and timed events.

This commit is contained in:
Yogi Wiguna
2026-02-26 13:03:22 +08:00
parent a29f1639f2
commit 3a902aa3d7
2 changed files with 29 additions and 14 deletions
+11
View File
@@ -471,6 +471,9 @@ func _setup_host_game():
stop_n_go_manager._setup_arena()
# Arena is set up, wait for __start_game to assign positions where Socket is open
if LobbyManager.game_mode == "Tekton Doors" and portal_mode_manager:
portal_mode_manager.setup_arena_locally()
_start_game()
func _spawn_lobby_client_sync(peer_id: int):
@@ -530,6 +533,10 @@ func _setup_client_game():
add_player_character(i, true)
print("Client: Pre-spawned potential bot ", i)
# Initialize arena locally for Tekton Doors
if LobbyManager.game_mode == "Tekton Doors" and portal_mode_manager:
portal_mode_manager.setup_arena_locally()
# Ensure local player setup (UI, controls) is verified
var player_character = get_node_or_null(str(my_id))
if player_character:
@@ -619,6 +626,10 @@ func _start_game():
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors":
spawn_static_tektons()
# Tekton Doors: Randomize connections BEFORE countdown so colors show
if LobbyManager.game_mode == "Tekton Doors" and portal_mode_manager:
portal_mode_manager._randomize_connections()
await _start_pre_game_countdown()
GameStateManager.start_game()