feat: Add core player entity with movement, race, input, character selection, and multiplayer synchronization, integrating various game managers.

This commit is contained in:
Yogi Wiguna
2026-02-23 15:57:41 +08:00
parent 8a5c25be23
commit 3a5e6ad703
4 changed files with 54 additions and 66 deletions
+5 -4
View File
@@ -1311,10 +1311,11 @@ func start_movement_along_path(path: Array, clear_visual: bool = true):
# This ensures that when interpolation resumes (in _process), it pulls to the correct spot
target_visual_position = grid_to_world(current_position)
# Check if we've reached the finish line (uses lap-aware finish locations)
var current_finish_locs = race_manager.get_current_finish_locations() if race_manager else finish_locations
if current_position in current_finish_locs and can_finish:
finish_race()
# Racing Win Check (Skipped in Stop n Go which uses its own block above)
if LobbyManager.game_mode != "Stop n Go":
var current_finish_locs = race_manager.get_current_finish_locations() if race_manager else finish_locations
if current_position in current_finish_locs and can_finish:
finish_race()
var main = get_tree().get_root().get_node_or_null("Main")