public void Init() { isCanOnClick = true; OnOnAudioRightObj.SetActive(true); OffOnAudioRightObj.SetActive(false); nickNameText.text = GameData.Instance.NickName; passwordText.text = GameData.Instance.PassWord; GameData.Instance.NickNameChangeEvent += UpdateNickName; GameData.Instance.PasswordChangeEvent += UpdatePassword; SetAudioState(GameData.Instance.GetAudioSetting() == 1?true:false); }
void SetAudioState(bool state) { if (state) { OnOnAudioRightObj.SetActive(true); OffOnAudioRightObj.SetActive(false); } else { OnOnAudioRightObj.SetActive(false); OffOnAudioRightObj.SetActive(true); } }