feat: half update
This commit is contained in:
@@ -8,6 +8,16 @@ var cell_size := Vector3(1, 1, 1)
|
||||
var cells: Dictionary = {} # Vector3i -> item id
|
||||
var astar_inits := 0
|
||||
|
||||
# Walkable-tile set. Items in this list are passable for the bot planner.
|
||||
# By default everything is walkable except the items the bot calls out
|
||||
# explicitly via `non_walkable_items`.
|
||||
var non_walkable_items: Array[int] = []
|
||||
var columns: int = 20
|
||||
var rows: int = 20
|
||||
|
||||
func is_position_valid(pos: Vector2i) -> bool:
|
||||
return pos.x >= 0 and pos.x < columns and pos.y >= 0 and pos.y < rows
|
||||
|
||||
func set_cell_item(pos: Vector3i, item: int, _orientation: int = 0) -> void:
|
||||
if item == -1:
|
||||
cells.erase(pos)
|
||||
|
||||
Reference in New Issue
Block a user