feat: implement player character system with network synchronization and visual effects

This commit is contained in:
Yogi Wiguna
2026-03-30 15:36:28 +08:00
parent f08b21006b
commit f43dba73a2
5 changed files with 483 additions and 1 deletions
+7 -1
View File
@@ -1284,7 +1284,7 @@ func is_position_occupied(pos: Vector2i) -> bool:
if p.is_player_moving and p.target_position == pos:
return true
# Prevent overlap with Static Tekton Stands (3x3 area)
# Prevent overlap with Static Tekton Stands (3x3 area) using active nodes
if enhanced_gridmap:
for stand in get_tree().get_nodes_in_group("StaticTektonStands"):
var local_pos = enhanced_gridmap.to_local(stand.global_position)
@@ -1292,6 +1292,12 @@ func is_position_occupied(pos: Vector2i) -> bool:
if abs(pos.x - stand_map_pos.x) <= 1 and abs(pos.y - stand_map_pos.z) <= 1:
return true
var main_node = get_tree().get_root().get_node_or_null("Main")
if main_node and "reserved_static_positions" in main_node:
for reserved in main_node.reserved_static_positions:
if abs(pos.x - reserved.x) <= 1 and abs(pos.y - reserved.y) <= 1:
return true
return false
func find_valid_starting_position() -> Vector2i:
+9
View File
@@ -144,6 +144,15 @@ billboard = 1
sprite_frames = ExtResource("10_y4r1p")
animation = &"wall-initiator"
[node name="scatter_knock" type="AnimatedSprite3D" parent="." unique_id=808896775]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 1.509958e-07, 0, -1.509958e-07, 0.5, 0, 1.5475016, 0.012766336)
visible = false
billboard = 1
sprite_frames = ExtResource("10_y4r1p")
animation = &"scatter_knock"
frame = 59
frame_progress = 1.0
[node name="floor_spawn_top" type="AnimatedSprite3D" parent="." unique_id=248195140]
transform = Transform3D(0.5, 0, 0, 0, -0.5, -7.54979e-08, 0, 7.54979e-08, -0.5, 0, 1.4714267, 0.02553294)
visible = false