Fixed more movement bugs, disabled expansions for now. Added turnendbehaviour (for bee, should add trigger by turn end signal)
This commit is contained in:
parent
5722ffab48
commit
26fec25a6e
14 changed files with 154 additions and 37 deletions
|
|
@ -1,2 +1,16 @@
|
|||
extends ActionBehaviour
|
||||
class_name ActionBehaviourMosquito
|
||||
|
||||
# GameEvents.insect_tiles_selected_for_action
|
||||
func select_targets(source_pos: Vector4i, map: HexGrid): # -> Array[InsectTile]:
|
||||
var neighbours = map.get_neighbours(source_pos)
|
||||
# Filter out other mosquitos
|
||||
var possible_action_targets: Array[InsectTile] = []
|
||||
for neighbour in neighbours:
|
||||
var tile = map.get_tile(neighbour)
|
||||
if tile != null:
|
||||
# TODO: Find better way to see what tile we have...
|
||||
if not tile.resource.movement_behaviour is MovementBehaviourMosquito:
|
||||
possible_action_targets.push_back(tile)
|
||||
|
||||
GameEvents.insect_tiles_selected_for_action.emit(source_pos, possible_action_targets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue