public void SetDestination(Coordinates desiredDestination) { if (pathRequested == true) { return; } if (Metrics.time < nextPathRequest) { return; } if (Coordinates.AreEqual(destination, desiredDestination) == true) { return; } pathRequested = true; nextPathRequest = Metrics.time + msBetweenPathRequests; Pathfinder.RequestPath(new PathRequest(Coordinates.FromWorldSpace(owner.gameObject.transform.position), desiredDestination, OnPathFound)); }