public GetTextValue ( string key ) : string | ||
key | string | /// The Language Key. /// |
return | string |
void ReadVersion(XmlNode infoNode) { if (infoNode == null) { return; } float appVer = GetFloatFromAttribute(infoNode, "app_version", 0); float dataVer = GetFloatFromAttribute(infoNode, "data_version", 0); float currAppVer = Convert.ToSingle(Application.version, CultureInfo.InvariantCulture.NumberFormat); float oldDataVer = PlayerPrefs.GetFloat("DataVer", 0); if (oldDataVer < dataVer) { fileManager.ClearCacheDirectory(); } PlayerPrefs.SetFloat("DataVer", dataVer); PlayerPrefs.Save(); if (currAppVer < appVer) { updateText.SetActive(true); } infoText.text = "App: " + currAppVer.ToString() + "." + dataVer + " " + langManager.GetTextValue("info.sync") + " " + PlayerPrefs.GetString("SyncDate"); }
void UpdateButtons() { if (!chest.buttonsDisabled) { if (!playerController.isWalking && !chest.isAtBottom) {//Saltar if (!submitButtonImage.activeSelf) { submitButtonImage.SetActive(true); } submitButtonText.text = m_LanguageManagerInstance.GetTextValue(m_JumpText); } else if (playerController.isWalking) {//Empujar if (!submitButtonImage.activeSelf) { submitButtonImage.SetActive(true); } submitButtonText.text = m_LanguageManagerInstance.GetTextValue(m_PushText);; } else { DisableButtons(); } } else { DisableButtons(); } }
void Start() { LanguageManager thisLanguageManager = LanguageManager.Instance; title.text = thisLanguageManager.GetTextValue("UI.AlbumTitle"); description.text = thisLanguageManager.GetTextValue("UI.AlbumDesc"); }
IEnumerator TutorialPop() { LanguageManager thisLanguageManager = LanguageManager.Instance; string[] tr = new string[] { thisLanguageManager.GetTextValue("Tutorial.1"), thisLanguageManager.GetTextValue("Tutorial.2"), thisLanguageManager.GetTextValue("Tutorial.3") }; // EventDialog dialogScript = dialogWindow.GetComponent<EventDialog>(); yield return(new WaitForSeconds(3.0f)); dialogWindow.SetActive(true); DialogManager.Instance.SetDialog(1, tr[0]); SoundManager.Instance.PlaySound(3); yield return(new WaitForSeconds(8.0f)); dialogWindow.SetActive(true); DialogManager.Instance.SetDialog(3, tr[1]); yield return(new WaitForSeconds(8.0f)); dialogWindow.SetActive(true); DialogManager.Instance.SetDialog(4, tr[2]); PlayerPrefs.SetInt("isTutorialDone", 1); }
// Use this for initialization void Start() { LanguageManager thisLanguageManager = LanguageManager.Instance; title.text = thisLanguageManager.GetTextValue("UI.SNSTitle"); facebook.text = thisLanguageManager.GetTextValue("UI.SNSFacebook"); googleLeader.text = thisLanguageManager.GetTextValue("UI.GoogleLeader"); googleAchievement.text = thisLanguageManager.GetTextValue("UI.GoogleAchievement"); }
// Use this for initialization void Start() { LanguageManager thisLanguageManager = LanguageManager.Instance; areYouSure.text = thisLanguageManager.GetTextValue("UI.QuitGame"); yourShip.text = thisLanguageManager.GetTextValue("UI.Keepgoing"); Yes.text = thisLanguageManager.GetTextValue("UI.Yes"); No.text = thisLanguageManager.GetTextValue("UI.No"); }
// Use this for initialization void Start() { LanguageManager thisLanguageManager = LanguageManager.Instance; title.text = thisLanguageManager.GetTextValue("UI.SettingTitle"); effectSound.text = thisLanguageManager.GetTextValue("UI.EffectSound"); bgm.text = thisLanguageManager.GetTextValue("UI.BGM"); credits.text = thisLanguageManager.GetTextValue("UI.Credit"); restart.text = thisLanguageManager.GetTextValue("UI.Restart"); }
void Start() { LanguageManager languageManager = LanguageManager.Instance; SmartCultureInfo systemLanguage = languageManager.GetSupportedSystemLanguage(); if (systemLanguage != null) { languageManager.ChangeLanguage(systemLanguage); } if (systemLanguage.languageCode == "ru" || systemLanguage.languageCode == "ru-RU") { RectTransform rt = (RectTransform)GameObject.Find("BestScoreText").transform; rt.sizeDelta = new Vector2(rt.rect.width, 26f); } GameObject.Find("YourScoreText").GetComponent <Text> ().text = languageManager.GetTextValue("Score"); GameObject.Find("BestScoreText").GetComponent <Text> ().text = languageManager.GetTextValue("BestScore"); data = GameObject.Find("Data").GetComponent <Data> (); buffEffects = GetComponent <BuffEffects> (); sprites = new List <Sprite> (Resources.LoadAll <Sprite> ("parts/")); Circles = GameObject.FindGameObjectsWithTag("Loose").OrderBy(g => g.name).ToArray(); initialBorder(); setBackground(); skillScript = GetComponent <Skills> (); GameObject[] array = GameObject.FindGameObjectsWithTag("Parts").OrderBy(g => g.transform.parent.name).ToArray(); circleParts = new SpriteRenderer[array.Length]; int k = 0; foreach (GameObject part in array) { circleParts [k] = part.GetComponent <SpriteRenderer> (); k++; } GameObject obj = GameObject.Find("RowColor"); points = GameObject.Find("Count").GetComponentInChildren <Text> (); points.text = curPoints.ToString(); blocks = new Image[blocksUILength]; counts = new Text[blocksUILength]; for (int i = 0; i < blocksUILength; i++) { blocks [i] = obj.GetComponentsInChildren <Image> () [i]; blocks [i].transform.localScale = new Vector2(blocks [i].transform.localScale.x, blocks [i].transform.localScale.x); counts [i] = obj.GetComponentsInChildren <Text> () [i]; counts [i].enabled = false; } nextRound(); randSprites(); setRightTag(); rigthCount = counts [step]; num = step % circlesLength; updCount(); rigthCount = counts [0]; }
void OnGUI() { GUI.depth = 0; if (!aPantallaCompleta) { GUI.DrawTexture(posFondo, texturaFondoMono); GUI.Label(posFondo, traduccion.GetTextValue("general_debe_ser_fullscreen"), estiloMenu.label); return; } if (menuDeIdioma.enabled || menuPuntajes.enabled) { return; } GUI.DrawTextureWithTexCoords(posFondo, texturaFondo, coordFondo); GUI.DrawTexture(posLogo, logo); //botones musica GUI.BeginGroup(posBotonesAudio); if (GUI.Button(posBotonSonido, "", (configuracionGeneral.estaElSonidoActivo ? estiloBotonSonidoOn : estiloBotonSonidoOff))) { configuracionGeneral.estaElSonidoActivo = !configuracionGeneral.estaElSonidoActivo; } if (GUI.Button(posBotonMusica, "", (configuracionGeneral.estaLaMusicaActiva ? estiloBotonMusicaOn : estiloBotonMusicaOff))) { configuracionGeneral.estaLaMusicaActiva = !configuracionGeneral.estaLaMusicaActiva; } GUI.EndGroup(); GUILayout.BeginArea(posMenuCentral, estiloMenu.box); GUILayout.BeginVertical(); if (GUILayout.Button(traduccion.GetTextValue("menuprincipalnuevaaventura"), estiloBotonMenuCentral)) { LevelLoader.CargarNivel(primerNivel); } if (GUILayout.Button(traduccion.GetTextValue("menuprincipalnuevaidioma"), estiloBotonMenuCentral)) { menuDeIdioma.enabled = true; menuDeIdioma.puedeCerrar = true; } if (GUILayout.Button(traduccion.GetTextValue("menuprincipalverpuntajes"), estiloBotonMenuCentral)) { menuPuntajes.enabled = true; } GUILayout.EndVertical(); GUILayout.EndArea(); }
private void OnInitComplete() { Debug.Log("FB.Init completed: Is user logged in? " + FB.IsLoggedIn); LanguageManager thisLanguageManager = LanguageManager.Instance; if (FB.IsLoggedIn) { facebookButtonDesc.text = thisLanguageManager.GetTextValue("UI.SNSFacebook"); } else { facebookButtonDesc.text = thisLanguageManager.GetTextValue("UI.SNSFacebook"); } }
void Start() { LanguageManager thisLanguageManager = LanguageManager.Instance; welcome.text = thisLanguageManager.GetTextValue("UI.StoreTitle"); product1.text = thisLanguageManager.GetTextValue("UI.Product1"); product1desc.text = thisLanguageManager.GetTextValue("UI.Product1Desc"); product2.text = thisLanguageManager.GetTextValue("UI.Product2"); product2desc.text = thisLanguageManager.GetTextValue("UI.Product2Desc"); product3.text = thisLanguageManager.GetTextValue("UI.Product3"); product4.text = thisLanguageManager.GetTextValue("UI.Product4"); product5.text = thisLanguageManager.GetTextValue("UI.Product5"); product6.text = thisLanguageManager.GetTextValue("UI.Product6"); storeThanks.text = thisLanguageManager.GetTextValue("UI.StoreThanks"); }
void OnGUI() { GUI.depth = 0; GUI.DrawTexture(posFondo, texturaFondo); GUILayout.BeginArea(posPanelCentral.Position, estilo.box); //puntaje GUILayout.BeginArea(posGrupoPuntaje.Position, estilo.box); GUILayout.BeginVertical(); GUILayout.Label(traductor.GetTextValue("guardar_puntaje_label_puntaje") + ":", estiloLabelPuntaje); GUILayout.Label(strPuntaje, estiloValorPuntaje); GUILayout.EndVertical(); GUILayout.EndArea(); //nombre GUILayout.BeginArea(posGrupoNombre.Position, estilo.box); GUILayout.BeginVertical(); GUILayout.Label(traductor.GetTextValue("guardar_puntaje_label_nombre") + ":", estilo.label, GUILayout.ExpandWidth(true)); GUI.SetNextControlName("campo_nombre"); //valorTxtNombre = GUILayout.TextField(valorTxtNombre,estilo.textField); CampoNombre.DrawUsingGUILayout(estilo.textField); if (CampoNombre.Text.Length > logitudMaximaDelNombre) { CampoNombre.Text = CampoNombre.Text.Substring(0, logitudMaximaDelNombre); } GUILayout.EndVertical(); GUILayout.EndArea(); GUILayout.FlexibleSpace(); //GUILayout.BeginArea(posGrupoBotones); GUILayout.BeginVertical(); if (GUILayout.Button(traductor.GetTextValue("guardar_puntaje_boton_guardar_cerrar"), estiloBoton, GUILayout.ExpandWidth(true))) { if (CampoNombre.Text.Length > 0) { guardarYCerrar(); } } if (GUILayout.Button(traductor.GetTextValue("guardar_puntaje_boton_cancelar"), estiloBotonCancelar, GUILayout.ExpandWidth(true))) { this.enabled = false; } GUILayout.EndVertical(); // GUILayout.EndArea(); GUILayout.EndArea(); W8KeyboardManager.InvokeFirstUpdate(); }
IEnumerator ShowMessageCoroutine() { releaseConversation = false; previouslyAttackable = GameManager.instance.canGetEncounter; if (!sequencer.isOnSequence && previouslyAttackable) { GameManager.instance.canGetEncounter = false; } yield return(null); if (!IsDialogActive) { IsDialogActive = true; } MessageDialog msg; Text textField; CreateText(out msg, out textField); if (textField != null) { textField.text = languageManager.GetTextValue(msg.dialogText); } }
public void CheckGameVersion(GameVersionInfo gameVersion) { if (gameVersionText != null && gameVersion != null && gameVersion.latest != Application.version && IsBiggerVersion(gameVersion.latest)) { gameVersionText.text = m_LanguageManagerInstance.GetTextValue("Main.UpdateAvailable"); } }
protected void TranslateText() { for (int i = 0; i < m_FieldTexts.Count; ++i) { m_FieldTexts[i].fieldText.text = m_LanguageManagerInstance.GetTextValue(m_FieldTexts[i].textKey); } }
// Use this for initialization void Awake() { previousGoal = PlayerPrefs.GetInt("previousGoal"); if (previousGoal == 0) { previousGoal = -1; } GameController.nextGoalName = DialogManager.m_Goals[0].name; GameController.nextGoalDistance = DialogManager.m_Goals[0].distance; eventCount = PlayerPrefs.GetInt("eventCount"); Array.Reverse(DialogManager.m_Goals); goalWindow.SetActive(false); if (previousGoal < 3) { autoFightButton.SetActive(false); } LanguageManager thisLanguageManager = LanguageManager.Instance; rewardString = thisLanguageManager.GetTextValue("UI.Reward"); StartCoroutine(EventLoop()); }
private void ChangeText() { if (Text != null) { Text.text = languageManager.GetTextValue(Key); } }
void OnChangeLanguage(LanguageManager languageManager) { if (textObject != null) { textObject.text = languageManager.GetTextValue(localizedKey) ?? localizedKey; } }
void OnLanguageChanged(LanguageManager languageManager) { dropdown.options.Clear(); foreach(var options in optionData){ dropdown.options.Add(new Dropdown.OptionData(languageManager.GetTextValue(options.text), options.image)); } }
void OnLanguageChanged(LanguageManager languageManager) { dropdown.options.Clear(); foreach (var options in optionData) { dropdown.options.Add(new Dropdown.OptionData(languageManager.GetTextValue(options.text), options.image)); } }
void Start() { thisLanguageManager = LanguageManager.Instance; SmartCultureInfo systemLanguage = thisLanguageManager.GetDeviceCultureIfSupported(); if (thisLanguageManager.IsCultureSupported(systemLanguage)) { thisLanguageManager.ChangeLanguage(systemLanguage); //thisLanguageManager.ChangeLanguage("ko-KR"); } thisLanguageManager = LanguageManager.Instance; Continue.text = thisLanguageManager.GetTextValue("Game.Continue"); Menu.text = thisLanguageManager.GetTextValue("Game.Menu"); Pause.text = thisLanguageManager.GetTextValue("Game.Pause"); }
// void Awake() // { // status = "Ready"; // } void OnEnable() { LanguageManager thisLanguageManager = LanguageManager.Instance; Social.localUser.Authenticate((bool success) => { if (success) { leaderBoardButtonDesc.text = thisLanguageManager.GetTextValue("UI.GoogleLeader"); achievmentButtonDesc.text = thisLanguageManager.GetTextValue("UI.GoogleAchievement"); } else { leaderBoardButtonDesc.text = "You are not loggined GooglePlay"; achievmentButtonDesc.text = "You are not loggined GooglePlay"; } }); }
void Start() { LanguageManager thisLanguageManager = LanguageManager.Instance; welcome.text = thisLanguageManager.GetTextValue("UI.StoreTitle"); product1.text = thisLanguageManager.GetTextValue("UI.Product1"); product1desc.text = thisLanguageManager.GetTextValue("UI.Product1Desc"); product2.text = thisLanguageManager.GetTextValue("UI.Product2"); product2desc.text = thisLanguageManager.GetTextValue("UI.Product2Desc"); product3.text = thisLanguageManager.GetTextValue("UI.Product3"); product4.text = thisLanguageManager.GetTextValue("UI.Product4"); product5.text = thisLanguageManager.GetTextValue("UI.Product5"); product6.text = thisLanguageManager.GetTextValue("UI.Product6"); storeThanks.text = thisLanguageManager.GetTextValue("UI.StoreThanks"); StoreKitManager.productListReceivedEvent += allProducts => { Debug.Log("received total products: " + allProducts.Count); _products = allProducts; }; bool canMakePayments = StoreKitBinding.canMakePayments(); Debug.Log("StoreKit canMakePayments: " + canMakePayments); // array of product ID's from iTunesConnect. MUST match exactly what you have there! var productIdentifiers = new string[] { "coin1", "coin3", "coin4", "coin2", "VIP", "wingman" }; StoreKitBinding.requestProductData(productIdentifiers); // if( GUILayout.Button( "Restore Completed Transactions" ) ) // { // StoreKitBinding.restoreCompletedTransactions(); // } // if( GUILayout.Button( "Enable High Detail Logs" ) ) // { // StoreKitBinding.enableHighDetailLogs( true ); // } }
IEnumerator EncounterLoop() { LanguageManager thisLanguageManager = LanguageManager.Instance; if (EventManager.previousGoal > 1) { startWaitTime = 23f; } else { startWaitTime = 120f; } yield return(new WaitForSeconds(startWaitTime)); SpawnStar(); NoticeManager.Instance.SetNotice(thisLanguageManager.GetTextValue("Star.Pop"), 5f); yield return(new WaitForSeconds(23f)); while (true) { if (Random.Range(0, 5) > 0) { SpawnStar(); spawnWaitTime = 20f; } else if (Random.Range(0, 3) > 1) { NoticeManager.Instance.SetNotice(thisLanguageManager.GetTextValue("Whale.Pop"), 5); SpawnWhale(); spawnWaitTime = 15f; } else { NoticeManager.Instance.SetNotice(thisLanguageManager.GetTextValue("Alien.Pop"), 5); SpawnAlien(); spawnWaitTime = 45f; } yield return(new WaitForSeconds(spawnWaitTime)); // yield return new WaitForSeconds(173); GameController.Instance.SavePlayerData(); } }
// 구입 성공 완료 void purchaseSucceededEvent(GooglePurchase purchase) { LanguageManager thisLanguageManager = LanguageManager.Instance; Debug.Log("purchaseSucceededEvent: " + purchase); // 구입이 성공하면 불리는 함수. // 구입한 항목이 관리되지 않는 제품(캐시보석 같은) 놈이면, 요기서 소모를 시켜줌. 결재 성공했으니까. if (purchase.productId == "intotheblack.vip") { GameController.isVip = 1; PlayerPrefs.SetInt("isVip", GameController.isVip); resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Product1Result"); resultWindow.SetActive(true); } else if (purchase.productId == "intotheblack.venus") { GameController.wingMercury = 1; GameController.wingVenus = 1; PlayerPrefs.SetInt("mercury", GameController.wingMercury); PlayerPrefs.SetInt("venus", GameController.wingVenus); PlayerController.Instance.UpdateWing(); resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Product2Result"); resultWindow.SetActive(true); //script.UpdateWing(); } else if (purchase.productId == "intotheblack.shield") { Debug.Log("shield"); PlayerController.infinityShield = 1; PlayerPrefs.SetInt("infinityShield", PlayerController.infinityShield); } else { GoogleIAB.consumeProduct(purchase.productId); } // 아이템 넣는 처리는 죠 아래 소모 성공 함수가 실행되는 곳에서. void consumePurchaseSucceededEvent() }
void Start() { thisLanguageManager = LanguageManager.Instance; SmartCultureInfo systemLanguage = thisLanguageManager.GetDeviceCultureIfSupported(); if (thisLanguageManager.IsCultureSupported(systemLanguage)) { thisLanguageManager.ChangeLanguage(systemLanguage); //thisLanguageManager.ChangeLanguage("ko-KR"); } thisLanguageManager = LanguageManager.Instance; Line1.text = thisLanguageManager.GetTextValue("Upgrades.NotEnoughDiamonds"); Line2.text = thisLanguageManager.GetTextValue("Upgrades.DoYouWant"); Yes.text = thisLanguageManager.GetTextValue("Menu.Yes"); No.text = thisLanguageManager.GetTextValue("Menu.No"); }
void OnTriggerEnter(Collider other) { if (other.CompareTag("Bolt")) { other.gameObject.SetActive(false); if (health > 0) { // SpawnController.Instance.PopDust(other.transform.position); Vector3 slow = new Vector3(0, 0, -0.12f); gameObject.transform.rigidbody.velocity -= slow; if (other.gameObject.GetComponent <BoltStat>()) { health -= other.gameObject.GetComponent <BoltStat>().damage; } else { health -= 1; } } if (health <= 0) { SpawnManager.Instance.PopDustName(dustname, coins, transform.position); gameObject.SetActive(false); } else { SpawnManager.Instance.PopDust(other.transform.position); } } else if (other.CompareTag("Player")) { this.gameObject.SetActive(false); if (!PlayerController.isShield) { LanguageManager thisLanguageManager = LanguageManager.Instance; NoticeManager.Instance.SetNotice(thisLanguageManager.GetTextValue("fireOn"), 5); SpawnManager.Instance.PopDust(transform.position); GameController.Instance.SlowMotion(); } else { SpawnManager.Instance.PopDustName(dustname, coins, transform.position); } } else if (other.CompareTag("EMP")) { this.gameObject.SetActive(false); SpawnManager.Instance.PopDustName(dustname, coins, transform.position); } }
void Start() { // tempDustPoints = 0; LanguageManager thisLanguageManager = LanguageManager.Instance; sb.Length = 0; sb.AppendFormat(" Km/h [{0}] ", thisLanguageManager.GetTextValue("UI.ShipSpeed")); _speedFormat = sb.ToString(); sb.Length = 0; sb.AppendFormat("[{0}] [", thisLanguageManager.GetTextValue("UI.JourneyTime")); _timeFormat1 = sb.ToString(); sb.Length = 0; sb.AppendFormat(" {0}]", thisLanguageManager.GetTextValue("UI.Accel")); _timeFormat2 = sb.ToString(); sb.Length = 0; sb.AppendFormat("[{0}] ", thisLanguageManager.GetTextValue("UI.JourneyDistance")); _distanceFormat = sb.ToString(); _unit = " Km"; sb.Length = 0; sb.AppendFormat("[{0}] ", thisLanguageManager.GetTextValue("UI.NextDestination")); _next = sb.ToString(); colonyText.text = thisLanguageManager.GetTextValue("UI.ColonyProgress"); }
void OnChangeLanguage(LanguageManager languageManager) { #if EQUILIBRE_GAMES_DEBUG Debug.Log("Language changed"); #endif foreach (SmartTextData i in smartTextData) { i.text.text = languageManager.GetTextValue(i.localizedKey); } #if EVENTHANDLER EventHandler.TriggerEvent(TEXTMANAGEREVENT.ONLANGUAGECHANGED); #endif }
void purchaseSuccessfulEvent(StoreKitTransaction transaction) { LanguageManager thisLanguageManager = LanguageManager.Instance; Debug.Log("purchaseSuccessfulEvent: " + transaction); switch (transaction.productIdentifier) { case "coin1": GameController.dustPoints += 10000; resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Result1"); resultWindow.SetActive(true); break; case "coin2": resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Result2"); resultWindow.SetActive(true); // 보석 80개 주기 처리 GameController.dustPoints += 50000; break; case "coin3": resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Result3"); resultWindow.SetActive(true); // 보석 180개 주기 처리 GameController.dustPoints += 100000; break; case "coin4": resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Result4"); resultWindow.SetActive(true); // "에러 관련 메시지 처리 " GameController.dustPoints += 250000; break; case "VIP": GameController.isVip = 1; PlayerPrefs.SetInt("isVip", GameController.isVip); resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Product1Result"); resultWindow.SetActive(true); break; case "wingman": GameController.wingMercury = 1; GameController.wingVenus = 1; PlayerPrefs.SetInt("mercury", GameController.wingMercury); PlayerPrefs.SetInt("venus", GameController.wingVenus); PlayerController.Instance.UpdateWing(); resultWindow.GetComponent <StoreResult>().result = thisLanguageManager.GetTextValue("Store.Product2Result"); resultWindow.SetActive(true); break; } }
public IEnumerator ShowItemDialog(string itemName, bool isFemale) { IsMenuActive = true; string obtainedString; if (isFemale) { obtainedString = m_LanguageManager.GetTextValue("Item.LootFem"); } else { obtainedString = m_LanguageManager.GetTextValue("Item.Loot"); } string text = itemName + obtainedString; itemObtainedDialog.SetActive(true); itemObtainedDialog.GetComponentInChildren <Text> ().text = text; yield return(new WaitForSeconds(2)); IsMenuActive = false; itemObtainedDialog.SetActive(false); }
void OnChangeLanguage(LanguageManager thisLanguageManager) { uiSprite.spriteName = thisLanguageManager.GetTextValue(localizedKey); }