void CheckEnteredUsername()
 {
     inputName.text = inputName.text.Trim();
     if (SettingsController.GetController().SaveUsername(inputName.text.ToLower()))
     {
         settingsView.ShowGeneralSettings();
         gameObject.SetActive(false);
     }
     else
     {
         ShowIncorrectInputAnimation();
     }
 }
Example #2
0
        void Awake()
        {
            if (settingsController == null)
            {
                settingsController = this;
            }
            else if (settingsController != this)
            {
                Destroy(gameObject);
            }
            SystemLanguage systemLanguage = Application.systemLanguage;

            settingsModel = new SettingsModel(systemLanguage);
        }
        private void UpdateTexts()
        {
            switch (SettingsController.GetController().GetLanguage())
            {
            case 0:
                title.text = "CAMBIAR USUARIO";
                inputName.placeholder.GetComponent <Text>().text = "Ingresa tu nombre";
                incorrectInput.text = "Por favor, ingresa tu nombre";

                break;

            default:
                title.text = "SWITCH USER";
                inputName.placeholder.GetComponent <Text>().text = "Insert your name";
                incorrectInput.text = "Please, insert your name";
                break;
            }
        }
        private void UpdateTexts()
        {
            switch (SettingsController.GetController().GetLanguage())
            {
            case 0:
                title.text             = "CONFIGURACIÓN";
                languageLabel.text     = "IDIOMA";
                musicLabel.text        = "MÚSICA";
                soundLabel.text        = "SONIDO";
                switchPlayerLabel.text = "CAMBIAR JUGADOR";
                exitGameText.text      = "Salir del juego";
                break;

            default:
                title.text             = "SETTINGS";
                languageLabel.text     = "LANGUAGE";
                musicLabel.text        = "MUSIC";
                soundLabel.text        = "SOUND";
                switchPlayerLabel.text = "SWITCH PLAYER";
                exitGameText.text      = "Exit game";
                break;
            }
        }
        void Awake()
        {
            if (settingsController == null)
            {
                settingsController = this;
            }
            else if (settingsController != this)
            {
                Destroy(gameObject);
            }
            SystemLanguage systemLanguage = Application.systemLanguage;

            settingsModel = new SettingsModel(systemLanguage);
        }
 public void OnToggleBritish()
 {
     ClickSound();
     SettingsController.GetController().SwitchLanguage(1);
     UpdateTexts();
 }
 public void OnToggleArgentine()
 {
     ClickSound();
     SettingsController.GetController().SwitchLanguage(0);
     UpdateTexts();
 }
 public void OnToggleSound()
 {
     SettingsController.GetController().ToggleSFX();
     ClickSound();
 }
 public void OnToggleMusic()
 {
     ClickSound();
     SettingsController.GetController().ToggleMusic();
 }
 void OnEnable()
 {
     languageBtns[SettingsController.GetController().GetLanguage()].isOn = true; // toggle calls UpdateTexts(); when its value change
 }