private void Awake() { gameLoopScript = GameObject.Find("_GM").GetComponent <GameLoop>(); holderClass = GameObject.Find("_GM").GetComponent <InputHolderClass>(); // _GM object has the script attached holderClass.setLevel(1); level2On = false; // level 2 is not active YET // set the level we are on to LEVEL 1 }
private void Update() { myTimer += Time.deltaTime; // Debug.Log("Timer as INT: " + (int)myTimer); if ((100 <= myTimer && myTimer <= 101) && level2On == false) { level2On = true; Debug.Log(" Level 2 Start ---- Display Player Shadow Box "); holderClass.setLevel(2); gameLoopScript.newLevel(); } if (131 <= myTimer && myTimer <= 132) { // move on to level 3 after ~30 seconds of gameplay SceneManager.LoadScene("Level3"); } }