2024-03-04 16:04:40 +01:00
|
|
|
extends MovementBehaviour
|
|
|
|
|
class_name MovementBehaviourMosquito
|
2024-03-14 21:17:16 +01:00
|
|
|
|
|
|
|
|
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
|