Delete mode
This commit is contained in:
parent
1c20d54651
commit
c566936cfc
3 changed files with 48 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue