public void PathTo(int x, int y, int z)
    {
        currentPath.Clear();

        currentPath = BlockUtilities.GetPath(parentMap, this.x, this.y, (int)x, (int)y, z, false);

        if (currentPath == null || currentPath.Count <= 0)
        {
            currentPath = new List <Vector3>();
        }
        else
        {
            currentPath.Add(new Vector3(x, y, z));
        }

        SetIsIdle(true);
    }
Beispiel #2
0
    public void PathTo(int x, int y, int z)
    {
        currentPath.Clear();

        currentPath = BlockUtilities.GetPath(parentMap, this.x, this.y, (int)x, (int)y, z, false);

        if (currentPath == null || currentPath.Count <= 0)
        {
            currentPath = new List <Vector3>();
            //Debug.Log ("empty path");
        }
        else
        {
            //Debug.Log ("adding path: " + x + " " + y + " " + z);
            currentPath.Add(new Vector3(x, y, z));
        }

        SetIsIdle(true);
    }