feat: Add core player entity with network-synced properties, character selection, and manager integration.

This commit is contained in:
Yogi Wiguna
2026-02-25 12:24:12 +08:00
parent 4990ce3c89
commit 51df6ed4fc
2 changed files with 24 additions and 9 deletions
+5
View File
@@ -12,6 +12,8 @@ var powerup_manager
# Score tracking
var score: int = 0
signal position_changed
# Display name (synced across network)
var _display_name: String = ""
var display_name: String:
@@ -1412,6 +1414,7 @@ func start_movement_along_path(path: Array, clear_visual: bool = true):
func update_player_position(grid_position: Vector2i):
position = grid_to_world(grid_position)
emit_signal("position_changed")
func grid_to_world(grid_position: Vector2i) -> Vector3:
var world_position = Vector3(
@@ -1939,6 +1942,8 @@ func set_spawn_position(pos: Vector2i):
# Reveal character now that it's in the correct position
visible = true
emit_signal("position_changed")
@rpc("any_peer", "call_local", "reliable")