feat: Introduce modular player system with dedicated managers for movement, race, input, playerboard, actions, special tiles, and powerups, along with a new main scene and documentation.

This commit is contained in:
2025-12-16 02:37:26 +08:00
parent 96f5754f99
commit e41ffcfb67
9 changed files with 494 additions and 146 deletions
+11
View File
@@ -55,8 +55,19 @@ func start_cycle():
emit_signal("cycle_started")
if multiplayer.is_server():
# Initialize scores for all connected players
_initialize_player_scores()
rpc("sync_cycle_start")
func _initialize_player_scores():
"""Initialize scores for all connected players to 0."""
var all_players = get_tree().get_nodes_in_group("Players")
for player in all_players:
var peer_id = player.get_multiplayer_authority()
if not player_scores.has(peer_id):
player_scores[peer_id] = 0
_update_leaderboard()
@rpc("authority", "call_local", "reliable")
func sync_cycle_start():
current_cycle_timer = CYCLE_DURATION