public void setUp() { //Needs to be reset every setup. Else it will stay true once made true once. isCharacterEquipped = false; //Was added to avoid NullPointerException //In retrospect, this isn't needed because the button would only be active if the dimension was available. //But there's no point in resructuring the whole code, so whatever. dimensionAvailable = globalDataPreserver.Instance.characterChoices.TryGetValue(sceneIndex, out cachedChoices); if (dimensionAvailable && cachedChoices.availableCharacterIndexes.Contains(characterIndex)) { equippingVisual.SetActive(true); buyingVisual.SetActive(false); isCharacterBought = true; if (cachedChoices.selectedCharacter == characterIndex) { isCharacterEquipped = true; equipText.text = LocalizationText.GetText("equipped"); } else { equipText.text = LocalizationText.GetText("equip"); } } else { equippingVisual.SetActive(false); buyingVisual.SetActive(true); priceText.text = price.ToString(); } }
public void localize() { if (normalText) { normalText.text = LocalizationText.GetText(key); if (LocalizationText.GetLanguage().Equals("RU")) { normalText.font = russianFontUI; } else { normalText.font = normalFontUI; } return; } textMeshPro.text = LocalizationText.GetText(key); if (LocalizationText.GetLanguage().Equals("RU")) { textMeshPro.font = russianFontTMP; } else { textMeshPro.font = normalFontTMP; } }
public void playDenialSong() { audioSource.PlayOneShot(beepSound); #if UNITY_ANDROID && !UNITY_EDITOR toastScript.showToastOnUiThread(LocalizationText.GetText("shop toast")); #endif }
static void showErrorToast() { #if UNITY_ANDROID && !UNITY_EDITOR ToastMessageScript toast = new ToastMessageScript(); toast.initialize(); toast.showToastOnUiThread(LocalizationText.GetText("google sign-in error"), true); #endif }
static void showSigningInToast() { #if UNITY_ANDROID && !UNITY_EDITOR ToastMessageScript toast = new ToastMessageScript(); toast.initialize(); toast.showToastOnUiThread(LocalizationText.GetText("signing in"), true); #endif }
// Use this for initialization void Start() { text = GetComponent <Text> (); lastUpdate = Time.time; original = LocalizationText.GetText(text.text); text.text = original; }
public void startSingleplayer() { tickSound.Play(); MenuAttributes.vsKi = true; //MenuAttributes.difficulty = 1; is already set in the DifficultyScript MenuAttributes.firstPlayerName = LocalizationText.GetText("you"); SceneManager.LoadScene("singleplayer"); }
// Update is called once per frame void Update() { progressBarRef.value = Mathf.Clamp01(GameController.Instance.traveledDistance / GameController.Instance.maxDistance); if (Input.GetKeyDown(KeyCode.Escape)) { TwoOptionPanel.Instance.StartOptionPanel(LocalizationText.GetText("Restart"), () => { TCUtils.TCSceneTransitionHelper.Instance.StartLoadingScene(gameSceneName); }, LocalizationText.GetText("Quit"), () => { TCUtils.TCSceneTransitionHelper.Instance.StartLoadingScene(menuSceneName); }, null ); } progressText.text = ((int)(GameController.Instance.traveledDistance / showDistanceScale)) + "/" + ((int)(GameController.Instance.maxDistance / showDistanceScale)); }
// Token: 0x060003C7 RID: 967 RVA: 0x00011708 File Offset: 0x0000FB08 private void SetAllText() { if (this.WelcomeText != null) { this.WelcomeText.GetComponent <TextMesh>().text = LocalizationText.GetText("lblDoor111"); } if (this.lblCastle != null) { this.lblCastle.GetComponent <TextMesh>().text = LocalizationText.GetText("lblCastle"); } if (this.CarName != null) { this.CarName.GetComponent <TextMesh>().text = LocalizationText.GetText("CarName"); } }
public void setUp() { isDimensionBought = globalDataPreserver.Instance.characterChoices.ContainsKey(sceneIndex); if (isDimensionBought) { equippingVisual.SetActive(true); buyingVisual.SetActive(false); equipText.text = LocalizationText.GetText("bought"); } else { equippingVisual.SetActive(false); buyingVisual.SetActive(true); priceText.text = price.ToString(); } }
private void InitializeLanguage(string language) { LocalizationText.SetLanguage(language); foreach (var o in disableForEnglishUI) { o.SetActive(!language.Equals(English)); } foreach (var o in enableForEnglishUI) { o.SetActive(language.Equals(English)); } for (int i = 0; i < localizationTexts.Length; ++i) { localizationTexts[i].text = LocalizationText.GetText(textIds[i]); } }
private void SetAllText() { //Here wechange the Text of all referenced 3D Text Meshes. // ALWAYS Check if the GameObject reference is null, when you dont do it and one should be null then no one will work. // but if you do the check. Only the one with the gameobject null wont work. if (WelcomeText != null) { WelcomeText.GetComponent <TextMesh>().text = LocalizationText.GetText("lblDoor111"); } if (lblCastle != null) { lblCastle.GetComponent <TextMesh>().text = LocalizationText.GetText("lblCastle"); } if (CarName != null) { CarName.GetComponent <TextMesh>().text = LocalizationText.GetText("CarName"); } }
private void gameEnded(int winner) { buttonShowBoard.SetActive(true); pauseCanvas.SetActive(true); gameCanvas.SetActive(false); aiCanvas.SetActive(false); navigateBoardCanvas.SetActive(true); tutorial.disable(); gameOver = true; if (MenuAttributes.vsKi && kiPlayer == winner) { sounds.playLooser(); } else { sounds.playWinner(); } if (winner == FIRSTPLAYER) { winnerText.text = LocalizationText.GetText("theWinnerIs") + firstPlayerName; sounds.playWinner(); } else if (winner == SECONDPLAYER) { winnerText.text = LocalizationText.GetText("theWinnerIs") + secondPlayerName; } else if (winner == DRAW) { winnerText.text = LocalizationText.GetText("draw"); sounds.playLooser(); } }
private void loadTutorial(int which) { textTutorial.text = LocalizationText.GetText(stringsTutorial [tutorialCounter]); }
// Token: 0x060003B7 RID: 951 RVA: 0x00010BB8 File Offset: 0x0000EFB8 private void OnGUI() { GUI.Box(new Rect(10f, 10f, 120f, 100f), LocalizationText.GetText("lblLanguage")); if (this.ShowPlayerStats) { GUI.Box(new Rect(10f, 300f, 300f, 600f), LocalizationText.GetText("lblPlayerStats")); GUI.Label(new Rect(20f, 320f, 130f, 20f), LocalizationText.GetText("lblStrength")); GUI.Label(new Rect(20f, 340f, 130f, 20f), LocalizationText.GetText("lblLife")); GUI.Label(new Rect(20f, 360f, 130f, 20f), LocalizationText.GetText("lblEndurance")); GUI.Label(new Rect(20f, 380f, 130f, 20f), LocalizationText.GetText("lblWisdom")); GUI.Label(new Rect(20f, 400f, 130f, 20f), LocalizationText.GetText("lblIntelligence")); GUI.Label(new Rect(20f, 420f, 130f, 20f), LocalizationText.GetText("lblWeight")); GUI.Label(new Rect(20f, 440f, 130f, 20f), LocalizationText.GetText("lblHeight")); GUI.Label(new Rect(20f, 460f, 130f, 20f), LocalizationText.GetText("lblOld")); GUI.Label(new Rect(20f, 480f, 130f, 20f), LocalizationText.GetText("lblWilderness")); GUI.Label(new Rect(20f, 500f, 130f, 20f), LocalizationText.GetText("lblStreet")); GUI.Label(new Rect(20f, 520f, 130f, 20f), LocalizationText.GetText("lblFood")); GUI.Label(new Rect(20f, 540f, 130f, 20f), LocalizationText.GetText("lblThirst")); GUI.Label(new Rect(20f, 560f, 130f, 20f), LocalizationText.GetText("lblLvl")); GUI.Label(new Rect(20f, 580f, 130f, 20f), LocalizationText.GetText("lblSpellpower")); GUI.Label(new Rect(20f, 600f, 130f, 20f), LocalizationText.GetText("lblRunspeed")); GUI.Label(new Rect(20f, 620f, 130f, 20f), LocalizationText.GetText("lblCountry")); GUI.Label(new Rect(20f, 640f, 130f, 20f), LocalizationText.GetText("lblFriends")); GUI.Label(new Rect(20f, 660f, 130f, 20f), LocalizationText.GetText("lblEnemies")); GUI.Label(new Rect(20f, 680f, 130f, 20f), LocalizationText.GetText("lblMoney")); GUI.Label(new Rect(20f, 700f, 130f, 20f), LocalizationText.GetText("lblEarnings")); GUI.Label(new Rect(20f, 720f, 130f, 20f), LocalizationText.GetText("lblName")); GUI.Label(new Rect(20f, 740f, 130f, 20f), LocalizationText.GetText("lblSurName")); GUI.Label(new Rect(20f, 760f, 130f, 20f), LocalizationText.GetText("lblBorn")); GUI.Label(new Rect(200f, 320f, 120f, 20f), "110"); GUI.Label(new Rect(200f, 340f, 120f, 20f), "52"); GUI.Label(new Rect(200f, 360f, 120f, 20f), "40"); GUI.Label(new Rect(200f, 380f, 120f, 20f), "60"); GUI.Label(new Rect(200f, 400f, 120f, 20f), "80"); GUI.Label(new Rect(200f, 420f, 120f, 20f), "100"); GUI.Label(new Rect(200f, 440f, 120f, 20f), "200"); GUI.Label(new Rect(200f, 460f, 120f, 20f), "500"); GUI.Label(new Rect(200f, 480f, 120f, 20f), "800"); GUI.Label(new Rect(200f, 500f, 120f, 20f), "20"); GUI.Label(new Rect(200f, 520f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 540f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 560f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 580f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 600f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 620f, 120f, 20f), LocalizationText.GetText("Country")); GUI.Label(new Rect(200f, 640f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 660f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 680f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 700f, 120f, 20f), "12"); GUI.Label(new Rect(200f, 720f, 120f, 20f), LocalizationText.GetText("Name")); GUI.Label(new Rect(200f, 740f, 120f, 20f), LocalizationText.GetText("SurName")); GUI.Label(new Rect(200f, 760f, 120f, 20f), LocalizationText.GetText("BornCity")); GUI.TextArea(new Rect(20f, 780f, 280f, 110f), LocalizationText.GetText("PlayerText")); } if (GUI.Button(new Rect(10f, 280f, 100f, 20f), LocalizationText.GetText("lblPlayerStats"))) { this.ShowPlayerStats = !this.ShowPlayerStats; } if (GUI.Button(new Rect(30f, 40f, 80f, 20f), LocalizationText.GetText("btnEnglish"))) { LocalizationText.SetLanguage("EN"); } if (GUI.Button(new Rect(30f, 70f, 80f, 20f), LocalizationText.GetText("btnGerman"))) { LocalizationText.SetLanguage("DE"); } }
void OnGUI() { // Make a background box GUI.Box(new Rect(10, 10, 120, 100), LocalizationText.GetText("lblLanguage")); if (ShowPlayerStats) { GUI.Box(new Rect(10, 300, 300, 600), LocalizationText.GetText("lblPlayerStats")); //Text Label of Attributes GUI.Label(new Rect(20, 320, 130, 20), LocalizationText.GetText("lblStrength")); GUI.Label(new Rect(20, 340, 130, 20), LocalizationText.GetText("lblLife")); GUI.Label(new Rect(20, 360, 130, 20), LocalizationText.GetText("lblEndurance")); GUI.Label(new Rect(20, 380, 130, 20), LocalizationText.GetText("lblWisdom")); GUI.Label(new Rect(20, 400, 130, 20), LocalizationText.GetText("lblIntelligence")); GUI.Label(new Rect(20, 420, 130, 20), LocalizationText.GetText("lblWeight")); GUI.Label(new Rect(20, 440, 130, 20), LocalizationText.GetText("lblHeight")); GUI.Label(new Rect(20, 460, 130, 20), LocalizationText.GetText("lblOld")); GUI.Label(new Rect(20, 480, 130, 20), LocalizationText.GetText("lblWilderness")); GUI.Label(new Rect(20, 500, 130, 20), LocalizationText.GetText("lblStreet")); GUI.Label(new Rect(20, 520, 130, 20), LocalizationText.GetText("lblFood")); GUI.Label(new Rect(20, 540, 130, 20), LocalizationText.GetText("lblThirst")); GUI.Label(new Rect(20, 560, 130, 20), LocalizationText.GetText("lblLvl")); GUI.Label(new Rect(20, 580, 130, 20), LocalizationText.GetText("lblSpellpower")); GUI.Label(new Rect(20, 600, 130, 20), LocalizationText.GetText("lblRunspeed")); GUI.Label(new Rect(20, 620, 130, 20), LocalizationText.GetText("lblCountry")); GUI.Label(new Rect(20, 640, 130, 20), LocalizationText.GetText("lblFriends")); GUI.Label(new Rect(20, 660, 130, 20), LocalizationText.GetText("lblEnemies")); GUI.Label(new Rect(20, 680, 130, 20), LocalizationText.GetText("lblMoney")); GUI.Label(new Rect(20, 700, 130, 20), LocalizationText.GetText("lblEarnings")); GUI.Label(new Rect(20, 720, 130, 20), LocalizationText.GetText("lblName")); GUI.Label(new Rect(20, 740, 130, 20), LocalizationText.GetText("lblSurName")); GUI.Label(new Rect(20, 760, 130, 20), LocalizationText.GetText("lblBorn")); //Attributes GUI.Label(new Rect(200, 320, 120, 20), "110"); GUI.Label(new Rect(200, 340, 120, 20), "52"); GUI.Label(new Rect(200, 360, 120, 20), "40"); GUI.Label(new Rect(200, 380, 120, 20), "60"); GUI.Label(new Rect(200, 400, 120, 20), "80"); GUI.Label(new Rect(200, 420, 120, 20), "100"); GUI.Label(new Rect(200, 440, 120, 20), "200"); GUI.Label(new Rect(200, 460, 120, 20), "500"); GUI.Label(new Rect(200, 480, 120, 20), "800"); GUI.Label(new Rect(200, 500, 120, 20), "20"); GUI.Label(new Rect(200, 520, 120, 20), "12"); GUI.Label(new Rect(200, 540, 120, 20), "12"); GUI.Label(new Rect(200, 560, 120, 20), "12"); GUI.Label(new Rect(200, 580, 120, 20), "12"); GUI.Label(new Rect(200, 600, 120, 20), "12"); GUI.Label(new Rect(200, 620, 120, 20), LocalizationText.GetText("Country")); GUI.Label(new Rect(200, 640, 120, 20), "12"); GUI.Label(new Rect(200, 660, 120, 20), "12"); GUI.Label(new Rect(200, 680, 120, 20), "12"); GUI.Label(new Rect(200, 700, 120, 20), "12"); GUI.Label(new Rect(200, 720, 120, 20), LocalizationText.GetText("Name")); GUI.Label(new Rect(200, 740, 120, 20), LocalizationText.GetText("SurName")); GUI.Label(new Rect(200, 760, 120, 20), LocalizationText.GetText("BornCity")); //text of the Character GUI.TextArea(new Rect(20, 780, 280, 110), LocalizationText.GetText("PlayerText")); } //Show PlayerStats if (GUI.Button(new Rect(10, 280, 100, 20), LocalizationText.GetText("lblPlayerStats"))) { ShowPlayerStats = !ShowPlayerStats; } if (GUI.Button(new Rect(30, 40, 80, 20), LocalizationText.GetText("btnEnglish"))) { LocalizationText.SetLanguage("EN"); } if (GUI.Button(new Rect(30, 70, 80, 20), LocalizationText.GetText("btnGerman"))) { LocalizationText.SetLanguage("DE"); } }
public void ShowGameFail(float delay = 2.34f) { StartCoroutine(DelayedCall(() => TwoOptionPanel.Instance.StartOptionPanel(LocalizationText.GetText("Restart"), () => { TCUtils.TCSceneTransitionHelper.Instance.StartLoadingScene(gameSceneName); }, LocalizationText.GetText("Quit"), () => { TCUtils.TCSceneTransitionHelper.Instance.StartLoadingScene(menuSceneName); }, LocalizationText.GetText("Your rocket girls fell at :") + ((int)GameController.Instance.traveledDistance) + "/" + ((int)GameController.Instance.maxDistance) ), delay)); }