feat: Add core player entity with network-synced properties, character selection, and manager integration.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user