public static void checkSudoku() { if (!arena.checkHorizontal() || !arena.checkVertical() || !arena.checkSquare()) { Debug.Log("--- Sudoku is incorrect ---"); audio.play(audioController.soundType.SOUND_BADSUDOKU); } else { Debug.Log("--- SUDOKU IS CORRECT ---"); audio.play(audioController.soundType.SOUND_GOODSUDOKU); endGamePanel.setActive(true); endGamePanel.refresh(arena.getActiveLevel()); } }
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(); }