public void SetDestination(IMobile obj, ICoordinate to) { if (!obj.GetPosition().Equal(to)) { var path = PathFinder(obj.GetPosition(), to); if (path != null && path.Count > 0) { for (int i = 0; i < path.Count; ++i) { obj.Path = path; } } } }
public void SetDestination(IMobile obj, ICoordinate to) { if (!obj.GetPosition().Equal(to)) { var path = PathFinder(obj.GetPosition(), to); if (path != null && path.Count > 0) { for (int i = 0; i < path.Count; ++i) { obj.Path = path; } } } }