// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { if (isFirst) { GameObject.Find("LogoGetReady").SetActive(false); GameObject.Find("Tutorial").SetActive(false); GameObject.Find("PipeSpawnRoot").GetComponent <SpawnPipes>().enabled = true; GameManager.LoadScore("ScoreRoot"); isFirst = false; } } if (isOver) { //Game Over Logic: //Call the white Mask myMask.CallTheMask(MaskType.white); //Stop the Game timer Time.timeScale = 0.0f; //Load the GameEnd Scene GameStates.CurrState = States.End; isOver = false; } }
//-------------------------------------------------- //Unity Cycle private void Awake() { Init(); myMask.CallTheMask(MaskType.black); }