Implemented most movement. TODO: Pillbug ability. And find and fix bugs witht he movement. TODO: Deselect when not movable

This commit is contained in:
Sch1nken 2024-03-14 21:17:16 +01:00
parent 11f8a71f52
commit 76e4d6be34
33 changed files with 184 additions and 61 deletions

View file

@ -1,2 +1,13 @@
extends MovementBehaviour
class_name MovementBehaviourMosquito
func get_available_spaces(pos: Vector4i, map: HexGrid) -> Array[Vector4i]:
var target_spaces: Array[Vector4i] = []
for neighbour in map.get_neighbours(pos):
if map.is_cell_empty(neighbour):
continue
target_spaces.append_array(map.get_tile(neighbour).resource.movement_behaviour.get_available_spaces(pos, map))
return target_spaces