void GetSetLocalisedValue(string _key) { textField = gameObject.GetComponent <TextMeshProUGUI>(); string value = LocalisationSystem.GetLocalisedValue(_key); textField.text = value; }
public void DisplayItemInfo() { foreach (InventorySlot obj in InventoryParent.GetComponentsInChildren <InventorySlot>()) { obj.StopDisplayItemInfo(); } if (item != null) { DisplayText = ""; DisplayText += item.name + ": " + LocalisationSystem.GetLocalisedValue(DataController.GetValue <string>(item.name + "equipSlot")) + "\n"; ItemInfo.SetActive(true); foreach (string ModifierName in EquipmentModifiersList) { ModifierTemp = DataController.GetValue <int>(item.name + ModifierName); if (ModifierTemp > 0) { DisplayText += LocalisationSystem.GetLocalisedValue(ModifierName.Substring(8)) + " : + " + ModifierTemp + " %" + "\n"; } } TextItemInfo.text = DisplayText; } }
public int FinalMagicDamage(GameProcess player1, GameProcess player2, bool isDebuff) { int Damage; float MultFromRand; player2.animation.setAnimatorBoolTrue("Magic" + player1.magicEquipped); if (!isDebuff) { player1.animation.setAnimatorBoolTrue("PlayerMagicAttack"); MultFromRand = RandomCount.MagicDebuff(player1, player2, this); Damage = (int)(MultFromRand * Convert.MagicDmgFunc(player1)); //Debug.Log("Magic damage: " + MultFromRand + " * " + Convert.MagicDmgFunc(player1)); } else { if (player1.magicEquipped == "Fire") { Damage = (int)(Convert.MagicDmgFunc(player1) / Helper.debuffDmgMultFire); } else { Damage = (int)(Convert.MagicDmgFunc(player1) / Helper.debuffDmgMultCurse); } //Debug.Log("Magic damage: " + Convert.MagicDmgFunc(player1) / Helper.debuffDmgMult); } player1.animation.instantiateText("", new Vector3(0, 0, 0), LocalisationSystem.GetLocalisedValue(player1.magicEquipped), player2.playerObj.transform.position, player2.iAmLeft, false, false, true, true, false); player1.animation.instantiateText(player1.magicEquipped + "Parent", player2.playerObj.transform.position, "- " + Damage.ToString(), player2.playerObj.transform.position, player2.iAmLeft, false, false, true, false, false); return(Damage); }
public void OnGUI() { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Language : " + language.ToString()); EditorGUILayout.EndHorizontal(); key = EditorGUILayout.TextField("Key :", key); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Value:", GUILayout.MaxWidth(50)); EditorStyles.textArea.wordWrap = true; value = EditorGUILayout.TextArea(value, EditorStyles.textArea, GUILayout.Height(100), GUILayout.Width(400)); EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Add")) { if (LocalisationSystem.GetLocalisedValue(key) != string.Empty) { LocalisationSystem.Replace(key, value); } else { LocalisationSystem.Add(key, value); } } minSize = new Vector2(460, 250); maxSize = minSize; }
private void Awake() { subtitle = GetComponent <Image>(); switch (LocalisationSystem.GetSystemLanguage()) { case SystemLanguage.Japanese: if (JPsubtitle != null) { subtitle.sprite = JPsubtitle; } subtitle.enabled = true; return; case SystemLanguage.ChineseSimplified: if (ZHSsubtitle != null) { subtitle.sprite = ZHSsubtitle; } subtitle.enabled = true; return; case SystemLanguage.ChineseTraditional: if (ZHTsubtitle != null) { subtitle.sprite = ZHTsubtitle; } subtitle.enabled = true; return; default: Destroy(subtitle.gameObject); return; } }
// Start is called before the first frame update void Awake() { if (PlayerPrefs.GetString("Language") != null) { string languageID = PlayerPrefs.GetString("Language"); LocalisationSystem.SetLanguage(languageID); } else { LocalisationSystem.SetLanguageBySystem(); string languageID = LocalisationSystem.GetLanguage(); PlayerPrefs.SetString("Language", languageID); } textLocaliserUI = FindObjectsOfType <TextLocaliserUI>(); /*if (!PlayerPrefs.GetString("Language", "defaultValue").Equals("defaultValue")) * { * LocalisationSystem.SetLanguage(PlayerPrefs.GetString("Language")); * } * else * { * LocalisationSystem.SetLanguageBySystem(); * PlayerPrefs.SetString("Language", LocalisationSystem.GetLanguage()); * Debug.Log("Changed language by system"); * }*/ }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { EditorGUI.BeginProperty(position, label, property); position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label); position.width -= 34; position.height = 18; Rect valueRect = new Rect(position); valueRect.x += 15; valueRect.width -= 15; Rect foldButtonRect = new Rect(position); foldButtonRect.width = 15; dropdown = EditorGUI.Foldout(foldButtonRect, dropdown, ""); position.x += 15; position.width -= 15; SerializedProperty key = property.FindPropertyRelative("key"); key.stringValue = EditorGUI.TextField(position, key.stringValue); position.x += position.width + 2; position.width = 17; position.height = 17; Texture searchIcon = (Texture)Resources.Load("search"); GUIContent searchContent = new GUIContent(searchIcon); if (GUI.Button(position, searchContent)) { TextLocaliserSearchWindow.Open(); } position.x += position.width + 2; Texture storeIcon = (Texture)Resources.Load("store"); GUIContent storeContent = new GUIContent(storeIcon); if (GUI.Button(position, storeContent)) { TextLocalisedEditWindow.Open(key.stringValue); } if (dropdown) { var value = LocalisationSystem.GetLocalisedValue(key.stringValue); GUIStyle style = GUI.skin.box; height = style.CalcHeight(new GUIContent(value), valueRect.width); valueRect.height = height; valueRect.y += 21; EditorGUI.LabelField(valueRect, value, EditorStyles.wordWrappedLabel); } EditorGUI.EndProperty(); }
private void GetAddValuesField() { EditorGUILayout.BeginHorizontal(); GUILayout.Label("Key:", EditorStyles.boldLabel, GUILayout.MaxWidth(50)); GUILayout.Space(40); key = GUILayout.TextField(key); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Label("Value:", EditorStyles.boldLabel, GUILayout.MaxWidth(50)); GUILayout.Space(40); EditorStyles.textArea.wordWrap = true; value = EditorGUILayout.TextArea(value, EditorStyles.textArea, GUILayout.Height(100)); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); if (GUILayout.Button("Add")) { if (LocalisationSystem.GetLocalisedValue(key) != string.Empty) { LocalisationSystem.Replace(key, value); } else { LocalisationSystem.Add(key, value); } key = ""; value = ""; OnEnable(); } }
public void UseItem() { GameObject warning; if (item != null) { if (((Equipment)item).equipSlot == EquipmentSlot.BothHands) { if (DataController.GetValue <int>("StatsPowerMine") < 16) { warning = WarningScript.instance.warning; warning.SetActive(true); warning.GetComponentsInChildren <Text>()[0].text = LocalisationSystem.GetLocalisedValue("buyWarning2"); warning.GetComponentsInChildren <Text>()[1].text = LocalisationSystem.GetLocalisedValue("buyWarning2"); Debug.Log("breaking"); return; } } item.Use(); } }
// Token: 0x060007BB RID: 1979 RVA: 0x0002DCF4 File Offset: 0x0002BEF4 private void OnConnectionFail(DisconnectCause cause) { PlayerPrefs.SetString("ErrorMessage", LocalisationSystem.GetLocalisedValue("Error_Disconnected") + cause); FileBasedPrefs.SetInt("MissionStatus", 1); FileBasedPrefs.SetInt("StayInServerRoom", 0); FileBasedPrefs.SetInt("setupPhase", 1); }
private void LocalizText() { textField = GetComponent <TextMeshProUGUI>(); string value = LocalisationSystem.GetLocalisedValue(key); textField.text = value; }
// Token: 0x06000A55 RID: 2645 RVA: 0x000401F0 File Offset: 0x0003E3F0 private void ShowContract() { this.titleText.text = this.selectedContract.levelName; this.descriptionText.text = string.Concat(new string[] { this.selectedContract.basicDescription, " ", this.selectedContract.secondDescription, " ", this.selectedContract.thirdDescription }); this.firstBulletPointText.text = this.selectedContract.firstBulletPoint; this.secondBulletPointText.text = this.selectedContract.secondBulletPoint; this.thirdBulletPointText.text = this.selectedContract.thirdBulletPoint; if (this.selectedContract.levelDiffulty == Contract.LevelDifficulty.Amateur) { this.difficultyLevelText.text = LocalisationSystem.GetLocalisedValue("Contract_Amateur"); } else if (this.selectedContract.levelDiffulty == Contract.LevelDifficulty.Intermediate) { this.difficultyLevelText.text = LocalisationSystem.GetLocalisedValue("Contract_Intermediate"); } else { this.difficultyLevelText.text = LocalisationSystem.GetLocalisedValue("Contract_Professional"); } this.readyButton.interactable = true; this.selectButton.interactable = true; this.selectButtonText.color = new Color32(50, 50, 50, byte.MaxValue); this.descriptionObject.SetActive(true); this.mapObject.SetActive(false); }
public void ShowOrHide() { specialsCounter = 0; StatNum = 0; SpecialsMenu.SetActive(!SpecialsMenu.activeSelf); Texts = SpecialsMenu.GetComponentsInChildren <Text>(); if (SpecialsMenu.activeSelf) { foreach (string StatName in StatsList) { if (Title.name.Contains(StatName)) { Texts[5].text = LocalisationSystem.GetLocalisedValue("specials") + " " + LocalisationSystem.GetLocalisedValue(StatName.ToLower()) + " :"; Texts[6].text = LocalisationSystem.GetLocalisedValue("specials") + " " + LocalisationSystem.GetLocalisedValue(StatName.ToLower()) + " :"; foreach (Text text in Texts) { if (specialsCounter < 5) { text.text = LocalisationSystem.GetLocalisedValue("tier") + (specialsCounter + 1) + " : " + AllTexts[StatNum][specialsCounter]; } specialsCounter++; } break; } StatNum++;; } } }
// Token: 0x060009ED RID: 2541 RVA: 0x0003D3FC File Offset: 0x0003B5FC public void LoadText() { if (this.textField != null && this.textField.text != string.Empty) { this.textField.text = LocalisationSystem.GetLocalisedValue(this.key); } }
// Token: 0x06000AE7 RID: 2791 RVA: 0x00044494 File Offset: 0x00042694 private void Update() { if (XRDevice.isPresent) { return; } this.timer -= Time.deltaTime; if (this.timer < 0f) { this.timer = 5.1f; this.index++; if (this.index == 1) { this.mainText.text = LocalisationSystem.GetLocalisedValue("Splash_VoiceRecognition"); this.headphonesImage.SetActive(false); base.StartCoroutine(this.ResetFade()); return; } if (this.index == 2) { this.mainScreen.SetActive(false); this.loadingScreen.SetActive(true); this.loadingAsyncManager.LoadScene("Menu_New"); } } }
public void UpdateLanguage() { textField = GetComponent <TextMeshProUGUI>(); string value = LocalisationSystem.GetLocalisedValue(key); textField.text = value; }
public void UserSignUp() { if (!IsValidEmail.IsValidmail(email.text)) { ErrorOutPut(LocalisationSystem.GetLocalisedValue("email_error")); } else { if (username.text.Length < 4 || !CreateRGX(username.text).IsMatch(username.text)) { ErrorOutPut(LocalisationSystem.GetLocalisedValue("username_error")); } else { if (displayName.text.Length < 4 || !CreateRGX(displayName.text).IsMatch(displayName.text)) { ErrorOutPut(LocalisationSystem.GetLocalisedValue("displayname_error")); } else { if (password.text.Length < 8 || !CreateRGX(password.text).IsMatch(password.text)) { ErrorOutPut(LocalisationSystem.GetLocalisedValue("password_error")); } else { ErrorOutPut(""); EventManager.StartListening <string>("OnSignUpResponse", OnSignUpResponse); GS_Authentication.SignUp(username.text, displayName.text, password.text, email.text, "OnSignUpResponse"); } } } } }
// Token: 0x06000ABD RID: 2749 RVA: 0x00042F0C File Offset: 0x0004110C private void SetupExperienceReward() { int @int = FileBasedPrefs.GetInt("myTotalExp", 0); int int2 = FileBasedPrefs.GetInt("totalExp", 0); int num = Mathf.FloorToInt((float)(@int / 100)); int num2 = num + 1; this.currentLevelText.text = num.ToString(); this.nextLevelText.text = num2.ToString(); this.experienceGainedText.text = LocalisationSystem.GetLocalisedValue("Experience_Gained") + int2.ToString(); if (Mathf.FloorToInt((float)((@int - int2) / 100)) < num && int2 > 0) { this.levelUpText.enabled = true; this.levelUpText.text = LocalisationSystem.GetLocalisedValue("Experience_Congrats") + num.ToString(); this.CheckUnlocks(num); } else { this.levelUpText.enabled = false; } this.expSlider.value = (float)(100 - (num2 * 100 - @int)); this.expSliderValueText.text = 100 - (num2 * 100 - @int) + "/100 XP".ToString(); this.playerStatsManager.UpdateLevel(); this.playerStatsManager.UpdateExperience(); FileBasedPrefs.GetInt("totalExp", 0); }
// Token: 0x06000B11 RID: 2833 RVA: 0x00045003 File Offset: 0x00043203 private string GetSmoothCamValueText() { if (this.SmoothCamValue != 0) { return(LocalisationSystem.GetLocalisedValue("Menu_On")); } return(LocalisationSystem.GetLocalisedValue("Menu_Off")); }
// Token: 0x06000AAC RID: 2732 RVA: 0x00042715 File Offset: 0x00040915 private string GetlocalPushToTalkText() { if (this.localPushToTalkValue != 0) { return(LocalisationSystem.GetLocalisedValue("Graphics_Off")); } return(LocalisationSystem.GetLocalisedValue("Graphics_On")); }
// Token: 0x06000AAB RID: 2731 RVA: 0x000426F6 File Offset: 0x000408F6 private string GetInvertedYLookText() { if (this.invertedYLookValue != 0) { return(LocalisationSystem.GetLocalisedValue("Graphics_On")); } return(LocalisationSystem.GetLocalisedValue("Graphics_Off")); }
// Token: 0x06000AA9 RID: 2729 RVA: 0x000426B8 File Offset: 0x000408B8 private string GetReflectionText() { if (this.reflectionValue != 0) { return(LocalisationSystem.GetLocalisedValue("Graphics_On")); } return(LocalisationSystem.GetLocalisedValue("Graphics_Off")); }
// Token: 0x06000AA8 RID: 2728 RVA: 0x00042699 File Offset: 0x00040899 private string GetVSyncText() { if (this.vsyncValue != 0) { return(LocalisationSystem.GetLocalisedValue("Graphics_On")); } return(LocalisationSystem.GetLocalisedValue("Graphics_Off")); }
// Token: 0x06000A27 RID: 2599 RVA: 0x0003ED5D File Offset: 0x0003CF5D private string GetFullscreenText() { if (this.fullscreenType != 0) { return(LocalisationSystem.GetLocalisedValue("PC_Fullscreen")); } return(LocalisationSystem.GetLocalisedValue("PC_Windowed")); }
public void ShowNoCoinsPopup(RuleSettings ruleSettings, int currentStarRecord) { string localisedMessage = GameConstants.MainGame.FeatureMessages.ReplayError; string message = string.Concat((localisedMessage.Substring(0, localisedMessage.IndexOf('#'))), levelReplayCost, (localisedMessage.Substring(localisedMessage.IndexOf('#') + 1))); noCoinsPopupDetails.PopulateInformation(ruleSettings.PuzzleIcon, LocalisationSystem.GetLocalisedValue(ruleSettings.PuzzleNameKey), message, currentStarRecord, replayGoldLevel); NoCoinsPopupPanel.SetActive(true); }
// Token: 0x06000A95 RID: 2709 RVA: 0x00041DE6 File Offset: 0x0003FFE6 private string GetDegreesText() { if (this.degreesValue == 0) { return(LocalisationSystem.GetLocalisedValue("Other_Celsius")); } return(LocalisationSystem.GetLocalisedValue("Other_Farenheit")); }
// Token: 0x06000B0F RID: 2831 RVA: 0x00044FC5 File Offset: 0x000431C5 private string GetMovementDirectionValueText() { if (this.movementDirectionValue != 0) { return(LocalisationSystem.GetLocalisedValue("VR_MovementHead")); } return(LocalisationSystem.GetLocalisedValue("VR_MovementController")); }
// Token: 0x06000B13 RID: 2835 RVA: 0x00045055 File Offset: 0x00043255 private string GetTeleportGrabText() { if (this.teleportGrabValue != 0) { return(LocalisationSystem.GetLocalisedValue("Menu_On")); } return(LocalisationSystem.GetLocalisedValue("Menu_Off")); }
// Token: 0x06000B0C RID: 2828 RVA: 0x00044F70 File Offset: 0x00043170 private string GetTurningText() { if (this.turningValue != 0) { return(LocalisationSystem.GetLocalisedValue("VR_Snap")); } return(LocalisationSystem.GetLocalisedValue("VR_Smooth")); }
// Token: 0x06000B10 RID: 2832 RVA: 0x00044FE4 File Offset: 0x000431E4 private string GetGrabTypeValueText() { if (this.grabTypeValue != 0) { return(LocalisationSystem.GetLocalisedValue("VR_Hold")); } return(LocalisationSystem.GetLocalisedValue("VR_Toggle")); }