Ejemplo n.º 1
0
    private void GenerateMazePath()
    {
        List <Direction> cur      = ChoosePath();
        List <Direction> newpaths = MazeCreator.FindPath(mazeDim, mazeDim, cur[cur.Count - 1]);

        Debug.Log("Background maze path");
        if (choosePathA)
        {
            mazePathB = newpaths;
        }
        else
        {
            mazePathA = newpaths;
        }
    }
Ejemplo n.º 2
0
    public void SetupRamp(GameObject rampObject)
    {
        pathQueue = new CircularQueue <PathPrefab>(queueLength);
        buildPoint.transform.position = new Vector3(0, 0, 30);
        tearDownComplete = false;
        foreach (Transform child in rampObject.transform)
        {
            ramp = child.gameObject;
            ramp.GetComponent <BoxCollider>().enabled = false;
            pathQueue.Add(ramp.GetComponent <PathPrefab>());
        }

        lastDirection = Direction.North;
        lastPath      = ramp.GetComponent <PathPrefab>();

        mazePathA      = MazeCreator.FindPath(mazeDim, mazeDim, lastDirection);
        choosePathA    = true;
        mazePathIndex  = 0;
        mazePathBuffer = 10;
    }