feat: implement core game scene, player logic, and modular manager architecture for Tekton Dash

This commit is contained in:
Yogi Wiguna
2026-03-31 22:08:57 +08:00
parent 1c4d3170ef
commit a88839b396
4 changed files with 38 additions and 61 deletions
+1 -8
View File
@@ -1345,20 +1345,13 @@ 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 (Exactly the 3x3 area)
if enhanced_gridmap:
# Prevent overlap with Static Tekton Stands (Exactly the 3x3 area) using the actual spawned nodes
for stand in get_tree().get_nodes_in_group("StaticTektonStands"):
var local_pos = enhanced_gridmap.to_local(stand.global_position)
var stand_map_pos = enhanced_gridmap.local_to_map(local_pos)
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: