feat: Implement core game managers, player movement logic, and initial UI scenes.

This commit is contained in:
2025-12-27 05:45:57 +08:00
parent 6870016ba6
commit c5e9d073fa
23 changed files with 1456 additions and 97 deletions
+11 -3
View File
@@ -205,7 +205,9 @@ func on_goal_completed(player: Node, time_remaining: float):
# Clear playerboard tiles (they convert to powerup bar reward)
player.playerboard.fill(-1)
player.rpc("sync_playerboard", player.playerboard)
# Use main scene's RPC which properly looks up player by ID on each client
if main_scene:
main_scene.rpc("sync_playerboard", peer_id, player.playerboard)
# Regenerate goals for this player
regenerate_goals_for_player(player)
@@ -250,7 +252,9 @@ func _process_cycle_end_for_all_players():
# Clear playerboard
player.playerboard.fill(-1)
player.rpc("sync_playerboard", player.playerboard)
# Use main scene's RPC which properly looks up player by ID
if main_scene:
main_scene.rpc("sync_playerboard", peer_id, player.playerboard)
# Generate new goals
regenerate_goals_for_player(player)
@@ -291,7 +295,11 @@ func regenerate_goals_for_player(player: Node):
int_goals.append(g)
player.goals = int_goals
player.rpc("sync_goals", int_goals)
# Use main scene's RPC which properly looks up player by ID on each client
var peer_id = player.get_multiplayer_authority()
if main_scene:
main_scene.rpc("sync_player_goals", peer_id, int_goals)
# =============================================================================
# Tile Randomization