Delete mode

This commit is contained in:
Rendo 2025-10-15 00:34:43 +05:00
commit c566936cfc
3 changed files with 48 additions and 4 deletions

View file

@ -38,5 +38,12 @@ func get_at(point : Vector2) -> Structure:
return null
return structures[index]
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
func is_point_occupied(point : Vector2) -> bool:
return get_at(point) != null