public bool PathfindTo(Point pos, OnPathEnded callback = null, float speed = 0.3F) { this.path = Util.FindPath(this.Map, this, (this.Position / this.Map.Scale).ToPoint(), pos, 10000); this.onPathEnded = callback; this.WalkSpeed = speed; return(this.path != null); }
public void Pathfind(Point point, OnPathEnded callback) { this.path = PathFinding.FindPath(this.Map, this.CollisionBounds, this.Position.ToPoint(), point, 10000); this.onPathEnded = callback; }