예제 #1
0
    // Use this for initialization
    void Start()
    {
        size = 3;
        gen  = new RandomMazeGenerator(size);
        gen.build();
        builder.BuildMaze(size, gen.print());

        cameraControls.cameraControllEnabled = false;
        playerControls.enabledControls       = false;
    }
예제 #2
0
 public void newLevel()
 {
     Destroy(GameObject.FindWithTag("maze"));
     Destroy(GameObject.FindWithTag("ElectricFloor"));
     Debug.Log("Destroyed Floor");
     if (playerControls.count < 3 || playerControls.count % 3 == 0)
     {
         size++;
     }
     //player.transform.position = (new Vector3 (-4, 0, 0));
     gen = new RandomMazeGenerator(size);
     gen.build();
     builder.BuildMaze(size, gen.print());
     Debug.Log("spawning new level");
 }