Ejemplo n.º 1
0
    public static List <Vector3> PathFancification(List <Vector3> path, int level)
    {
        path = ChooseFreeAdjacents(path, level);
        if (SpaceGraph.amountOfSpatialGraphLevels == 1)
        {
            return(path);
        }

        List <Vector3> newPath = new List <Vector3>();

        newPath.Add(path[0]);
        for (int i = 1; i < path.Count - 1; i++)
        {
            newPath.Add(SpaceGraph.FindCoordMaxCellCenter(path[i], level));
        }
        newPath.Distinct();
        newPath.Add(path[path.Count - 1]);
        return(newPath);
    }