22 lines
560 B
GDScript
22 lines
560 B
GDScript
class_name PathfindingResult
|
|
extends Node
|
|
|
|
var path: Array[NavigationNode] = []
|
|
var next_position: Vector2 = Vector2.ZERO
|
|
var is_next_target: bool = false
|
|
|
|
func _init() -> void:
|
|
path = []
|
|
next_position = Vector2.ZERO
|
|
is_next_target = false
|
|
|
|
func is_identical_to(other: PathfindingResult) -> bool:
|
|
if path.size() != other.path.size():
|
|
return false
|
|
for i in range(path.size()):
|
|
if path[i] != other.path[i]:
|
|
return false
|
|
if next_position != other.next_position:
|
|
return false
|
|
return true
|