feat: Implement core game scene logic in main.gd and introduce goals_cycle_manager.gd for managing game goals and cycles.

This commit is contained in:
Yogi Wiguna
2026-03-23 17:45:16 +08:00
parent 7f1ae0f757
commit 75a636c97c
2 changed files with 65 additions and 6 deletions
+4 -1
View File
@@ -1463,7 +1463,10 @@ func sync_player_goals(player_id: int, goals: Array):
call_deferred("_deferred_set_player_goals", player_id, goals)
func _deferred_set_player_goals(player_id: int, goals: Array):
await get_tree().create_timer(0.25).timeout
# Reduce delay to 0.05s for snappier updates (just enough to ensure nodes are in tree)
if not get_node_or_null(str(player_id)):
await get_tree().create_timer(0.1).timeout
var player = get_node_or_null(str(player_id))
if player and player.race_manager:
player.goals = goals.duplicate()