void Start() { setting = panel.GetComponent <RectTransform>() as RectTransform; if (((ServerList)PlayerPrefs.GetInt("ServerList")) == ServerList.CN) { serverState.text = "China"; } else if (((ServerList)PlayerPrefs.GetInt("ServerList")) == ServerList.SG) { serverState.text = "Singapore"; } if (PlayerPrefs.GetString(LANGUAGE) == CHINA) { PlayerPrefs.SetString(LANGUAGE, CHINA); chinaLang.SetActive(true); englishLang.SetActive(false); } else { PlayerPrefs.SetString(LANGUAGE, ENGLISH); chinaLang.SetActive(false); englishLang.SetActive(true); } TextUpdate(); #if UNITY_ANDROID && !UNITY_EDITOR version.text = "ver " + androidManager.GetVersionName("com.cspmedia.gamepartyplayer"); #endif }
IEnumerator Start() { #if UNITY_ANDROID && !UNITY_EDITOR GameObject go = GameObject.Find("AndroidManager"); androidManager = go.GetComponent <UXAndroidManager> (); androidManager.InitAndroid(); #endif //CommonUtil.ScreenSettingsPortrait(); if (UXPlayerLauncherController.Instance.IsConnected() == true) { if (UXConnectController.GetRoomNumber() != -1) { UXConnectController.SetRoomNumber(-1); } UXPlayerLauncherController.Instance.Clear(); } playerController = UXPlayerController.Instance; yield return(CommonLang.instance); //chineseButton.SetActive(true); //englishButton.SetActive(true); //logoImage.SetActive(true); //ChinaButton (); EnglishButton(); #if UNITY_ANDROID && !UNITY_EDITOR infoText.text = androidManager.GetVersionName("com.cspmedia.gamepartyplayer") + "/" + ((ServerList)PlayerPrefs.GetInt("ServerList")); #endif }
void Start() { setting = panel.GetComponent <RectTransform>() as RectTransform; Debug.Log("START : " + (ServerList)PlayerPrefs.GetInt("ServerList")); if (((ServerList)PlayerPrefs.GetInt("ServerList")) == ServerList.CN) { serverState.text = "China"; } else if (((ServerList)PlayerPrefs.GetInt("ServerList")) == ServerList.SG) { serverState.text = "Singapore"; } Debug.Log(PlayerPrefs.GetString(LANGUAGE)); if (PlayerPrefs.GetString(LANGUAGE) == CHINA) { chinaLang.SetActive(true); englishLang.SetActive(false); if (settingCloseWidth != 637) { textobj_player.text = "请下载Game party player"; textobj_store.text = "请输入房间号码还是拍QR码"; textobj_popup.text = "开始游戏至少要有两个人"; } } else { chinaLang.SetActive(false); englishLang.SetActive(true); if (settingCloseWidth != 637) { //textobj_player.text = "Please download the GamePartyPlayer"; //textobj_store.text = "Enter your room number or Scan QR code"; //textobj_popup.text = "Can start the game when\nthere are 2 players or more"; } } #if UNITY_ANDROID && !UNITY_EDITOR version.text = "ver " + androidManager.GetVersionName("com.cspmedia.gamepartyplayer"); #endif }