void Start()
    {
        mmc = GameObject.Find("MainMenuController").GetComponent <mainMenuScript>();
        Vector3 rot = transform.localRotation.eulerAngles;

        rotY             = rot.y;
        rotX             = rot.x;
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;
    }
Exemple #2
0
 //Do not use Start or Awake
 //This method launches after any necessary params are set
 //Use this for initialization
 void altStart()
 {
     isRestarting   = true;
     gameStarted    = false;
     gameWon        = false;
     gameLost       = false;
     isPaused       = false;
     gameTime       = 0;
     numFlags       = 0;
     cubesComputing = 0;
     mines          = new GameObject[numMines];
     gameCubes      = new GameObject[width, height];
     notMineFlags   = new ArrayList();
     calculateBoardParams();
     player = GameObject.Find("Main Camera");
     mmc    = GameObject.Find("MainMenuController").GetComponent <mainMenuScript>();
     generateBackgroundQuad();
     gameBoardClone.SetActive(false);
     StartCoroutine(generateGameCubes());
     gameBoardClone.SetActive(true);
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     mmc = GameObject.Find("MainMenuController").GetComponent <mainMenuScript>();
     gc  = GameObject.Find("GameController").GetComponent <gameController>();
 }