예제 #1
0
 public float SpatialDistance(GridCoords other)
 {
     return(Mathf.Sqrt(
                Mathf.Pow(X - other.X, 2) +
                Mathf.Pow(Y - other.Y, 2)
                ));
 }
 public SpacetimePathFindNode FindPath(
     GridCoords source, GridCoords target, float movementSpeed,
     int maxSteps)
 {
     return(SpacetimePathFinder.FindPath(
                _grid, source, target, CellSize, TimeStep, movementSpeed,
                maxSteps
                ));
 }
 public Vector3 GridCoordsToGlobal(GridCoords coords)
 {
     return(GridCoordsToGlobal(coords.X, coords.T, coords.Y));
 }
 public bool IsWithinBounds(GridCoords coords)
 {
     return(Utils.IsWithinBounds(in _grid, coords));
 }