gai-godot-games/pathfinding-algorithms/scenes/mario-party/MPPathfindingResult.gd

22 lines
566 B
GDScript
Raw Normal View History

2024-11-19 13:52:51 +01:00
class_name MPPathfindingResult
extends Node
var path: Array[MPNavigationNode] = []
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: MPPathfindingResult) -> 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