void Update() { if (countTime) { timer += Time.deltaTime; timerTxt.text = transformToTime(timer); movesTxt.text = moves.ToString(); } if (arena.checkEmpty()) { checkButton.activate(); } else { checkButton.deactivate(); } if (Input.GetKeyDown(KeyCode.Escape)) { arena.setActive(false); MainMenuManager.stats.updateStats(MainMenuManager.selectLevelPanel.Difficult); MainMenuManager.mainMenu.setActive(true); } }
void Awake() { timer = 0F; moves = 0; numpad = FindObjectOfType <numpadController>(); checkButton = FindObjectOfType <checkButtonController>(); arena = FindObjectOfType <arenaManager>(); endGamePanel = FindObjectOfType <EndGameController>(); audio = FindObjectOfType <audioController>(); timerTxt = GameObject.FindGameObjectWithTag("Timer display").gameObject.GetComponent <Text>(); movesTxt = GameObject.FindGameObjectWithTag("Moves display").gameObject.GetComponent <Text>(); numpad.gameObject.SetActive(false); endGamePanel.setActive(false); checkButton.deactivate(); LevelManager.Load(); }
void Awake() { timer = 0F; moves = 0; numpad = FindObjectOfType<numpadController>(); checkButton = FindObjectOfType<checkButtonController>(); arena = FindObjectOfType<arenaManager>(); endGamePanel = FindObjectOfType<EndGameController>(); audio = FindObjectOfType<audioController>(); timerTxt = GameObject.FindGameObjectWithTag("Timer display").gameObject.GetComponent<Text>(); movesTxt = GameObject.FindGameObjectWithTag("Moves display").gameObject.GetComponent<Text>(); numpad.gameObject.SetActive(false); endGamePanel.setActive(false); checkButton.deactivate(); LevelManager.Load(); }