diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-21 09:47:44 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-07-21 09:47:44 +0200 |
commit | 905f1d96b3e68037883f4d25baddcfb25884adf0 (patch) | |
tree | 9490b626ac1f0b29a0f0478f30e419b259b0964e | |
parent | aed4de134cae45ecae743d2f8848396267ebc2ac (diff) | |
download | godot-hexgrid-905f1d96b3e68037883f4d25baddcfb25884adf0.zip godot-hexgrid-905f1d96b3e68037883f4d25baddcfb25884adf0.tar.gz |
shorten HexMap.adjacents_of()
-rw-r--r-- | HexMap.gd | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -138,9 +138,8 @@ func _key(x : int, y : int) -> int: # build the 6 adjacent Tiles of a Tile given by it's col;row coordinates func adjacents_of(tile : Tile, tiles : Array) -> void: - _build_adjacents(tile.coords) tiles.clear() - for t in adjacents: tiles.append(t) + for t in _build_adjacents(tile.coords): tiles.append(t) func _build_adjacents(coords : Vector2) -> Array: adjacents.clear() |