mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Improved pathing debug draw
This commit is contained in:
@@ -74,13 +74,17 @@ class IMICRTS
|
||||
@path[@path_current_node]
|
||||
end
|
||||
|
||||
def path_current_node_index
|
||||
@path_current_node
|
||||
end
|
||||
|
||||
def path_next_node
|
||||
@path_current_node += 1
|
||||
end
|
||||
|
||||
def at_current_path_node?(position)
|
||||
def at_current_path_node?(entity)
|
||||
if node = path_current_node
|
||||
position.distance(node.tile.position) < @map.tile_size / 2
|
||||
entity.position.distance(node.tile.position) <= @entity.radius
|
||||
else
|
||||
true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user