rotation rework, deletion of complex objects
This commit is contained in:
parent
609b1b976d
commit
8dcd7725a9
15 changed files with 103 additions and 147 deletions
|
@ -42,8 +42,13 @@ func destroy_at(point : Vector2) -> void:
|
|||
var index = building_zone.indexify_global_point(point)
|
||||
if index == -1:
|
||||
return
|
||||
structures[index].queue_free()
|
||||
structures[index] = null
|
||||
|
||||
var found: Structure = structures[index]
|
||||
|
||||
for dim_point in found.get_dimension_points():
|
||||
structures[building_zone.indexify_global_point(found.global_position+dim_point)] = null
|
||||
|
||||
found.queue_free()
|
||||
|
||||
func is_point_occupied(point : Vector2) -> bool:
|
||||
return get_at(point) != null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue