feat: Implement core game managers, player movement logic, and initial UI scenes.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user