/// <summary> /// Initialiser les buttons du ui. /// </summary> private void initialiserButtonScript() { if (gameManager != null && levelManager != null) { //Button pour quitter if (btnQuit != null) { //Ajouter les events listeners btnQuit.initialiseClickedEvent(); btnQuit.onClickedEvent.AddListener(gameManager.returnToStart); //Cacher le button btnQuit.gameObject.SetActive(false); } //Button pour continuer if (btnResume != null) { //Ajouter les events listeners btnResume.initialiseClickedEvent(); btnResume.onClickedEvent.AddListener(levelManager.pauseLevel); //Cacher le button btnResume.gameObject.SetActive(false); } } }
/// <summary> /// Initialiser les buttons du iu. /// </summary> private void initialiseButtonEvent() { if (gameManager != null) { //PlayButton if (btnPlay != null) { btnPlay.initialiseClickedEvent(); btnPlay.onClickedEvent.AddListener(gameManager.startGame); } //QuitButton if (btnQuit != null) { btnQuit.initialiseClickedEvent(); btnQuit.onClickedEvent.AddListener(gameManager.quitGame); } //Button pour afficher l'écran de score if (btnScore != null) { btnScore.initialiseClickedEvent(); btnScore.onClickedEvent.AddListener(gameManager.loadScoreScreen); } } }
/// <summary> /// Initialiser les buttons du ui. /// </summary> private void initialiserButtonScript() { if (gameManager != null) { //Button quitter if (btnQuit != null) { btnQuit.initialiseClickedEvent(); btnQuit.onClickedEvent.AddListener(gameManager.returnToStart); } } }
/// <summary> /// Initialiser les buttons du ui. /// </summary> private void initialiserButtonScript() { //Button pour sauvegarder if (btnSave != null) { //Ajouter les events listeners btnSave.initialiseClickedEvent(); btnSave.onClickedEvent.AddListener(changePlayerName); btnSave.onClickedEvent.AddListener(gameManager.savePlayerScore); btnSave.onClickedEvent.AddListener(gameManager.returnToStart); } //Button pour quitter if (btnQuit != null) { //Ajouter les events listeners btnQuit.initialiseClickedEvent(); btnQuit.onClickedEvent.AddListener(gameManager.returnToStart); } }