// Use this for initialization void Start() { string language = LanguageManager.Instance.GetSystemLanguageEnglishName(); if (LanguageManager.Instance.IsLanguageSupportedEnglishName(language)) { LanguageManager.Instance.ChangeLanguage(LanguageManager.Instance.GetDeviceCultureIfSupported()); } else { LanguageManager.Instance.ChangeLanguage("en"); } //LanguageManager.Instance.ChangeLanguage ("ar"); if (true || LanguageManager.Instance.GetDeviceCultureIfSupported() != null && LanguageManager.Instance.GetDeviceCultureIfSupported().languageCode.Equals("ar")) { titleP1.text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("Register1")); titleP2.text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("Register2")); nameInputField.GetComponent <InputField>().placeholder.GetComponent <Text>().text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("YourName")); teamInputField.GetComponent <InputField>().placeholder.GetComponent <Text>().text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("YourTeam")); registerButtonText.text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("Register")); } else { titleP1.text = LanguageManager.Instance.GetTextValue("Register1"); titleP2.text = LanguageManager.Instance.GetTextValue("Register2"); nameInputField.GetComponent <InputField>().placeholder.GetComponent <Text>().text = LanguageManager.Instance.GetTextValue("YourName"); teamInputField.GetComponent <InputField>().placeholder.GetComponent <Text>().text = LanguageManager.Instance.GetTextValue("YourTeam"); registerButtonText.text = LanguageManager.Instance.GetTextValue("Register"); } registerBtn.GetComponent <Button>().onClick.AddListener(() => { RegisterBtn(); }); //play playBtn.GetComponent <Button>().onClick.AddListener(() => { PlayBtn(); }); //play homeBtn.GetComponent <Button>().onClick.AddListener(() => { HomeBtn(); }); //rate }
// Use this for initialization void Start() { string language = LanguageManager.Instance.GetSystemLanguageEnglishName(); if (LanguageManager.Instance.IsLanguageSupportedEnglishName(language)) { LanguageManager.Instance.ChangeLanguage(LanguageManager.Instance.GetDeviceCultureIfSupported()); } else { LanguageManager.Instance.ChangeLanguage("en"); } //LanguageManager.Instance.ChangeLanguage ("ar"); if (LanguageManager.Instance.GetDeviceCultureIfSupported() != null && LanguageManager.Instance.GetDeviceCultureIfSupported().languageCode.Equals("ar")) { gameOverText.text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("GameOver")); scoreText.text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("Score")); highScoreText.text = ArabicFixer.Fix(LanguageManager.Instance.GetTextValue("HighScore")); } else { gameOverText.text = LanguageManager.Instance.GetTextValue("GameOver"); scoreText.text = LanguageManager.Instance.GetTextValue("Score"); highScoreText.text = LanguageManager.Instance.GetTextValue("HighScore"); } sound = GetComponent <AudioSource>(); GameManager.instance.currentScore = 0; ingameScore.text = "" + GameManager.instance.currentScore; homeBtn.GetComponent <Button>().onClick.AddListener(() => { HomeBtn(); }); //home leaderBtn.GetComponent <Button>().onClick.AddListener(() => { LeaderboardBtn(); }); //leaderboard retryBtn.GetComponent <Button>().onClick.AddListener(() => { RetryBtn(); }); //retry shareBtn.GetComponent <Button>().onClick.AddListener(() => { ShareBtn(); }); //snapshot }
private void SetNewWords() { wordData1 = null; wordData2 = null; wordLetters1.Clear(); wordLetters2.Clear(); commonLetters.Clear(); uncommonLetters.Clear(); var question = GetConfiguration().Questions.GetNextQuestion(); List <ILivingLetterData> words = question.GetQuestions().ToList(); wordData1 = words[0] as LL_WordData; wordData2 = words[1] as LL_WordData; commonLetters = question.GetCorrectAnswers().ToList(); uncommonLetters = question.GetWrongAnswers().ToList(); Debug.Log("[New Round] Word 1: " + ArabicFixer.Fix(wordData1.Data.Arabic) + ", Word 2: " + ArabicFixer.Fix(wordData2.Data.Arabic) + "\nCommon: " + string.Join(" / ", commonLetters.Select(x => x.TextForLivingLetter.ToString()).Reverse().ToArray()) + ", Uncommon: " + string.Join(" / ", uncommonLetters.Select(x => x.TextForLivingLetter.ToString()).Reverse().ToArray())); }
public void ThemeClicked() { click.Play(); startGameBtn.SetActive(false); languageBtn.SetActive(false); shopBtn.SetActive(true); shopBtn.GetComponent <Animator>().SetTrigger("awake"); string s = AdjustedNumber(PlayerPrefs.GetString("coin", "100").ToString()); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { Money2.font = yekta; Money3.font = yekta; s = ArabicFixer.Fix(s); } else { Money2.font = myriad; Money3.font = myriad; } Money2.text = s; Money3.text = s; }
void DisplayText(Db.LocalizationData data, float _duration = 3) { // bool isContinue = !string.IsNullOrEmpty(TextUI.text); this.StopAllCoroutines(); textTween.Kill(); TextUI.text = ""; if (string.IsNullOrEmpty(data.Arabic)) { this.gameObject.SetActive(false); return; } this.gameObject.SetActive(true); if (WalkieTalkie.IsShown) { WalkieTalkie.Pulse(); } TextUI.text = data.Arabic != "" ? ReverseText(ArabicFixer.Fix(data.Arabic)) : data.Id; this.StartCoroutine(DisplayTextCoroutine(_duration)); Debug.Log("DisplayText() " + data + " - " + data.English); }
public static List <Char> PrintCharacters(List <char> uniqueCharacters, TextoLanguage language) { string[] paths = AssetDatabase.FindAssets("t:TextoData"); List <TextoData> allTextos = new List <TextoData>(); for (int i = 0; i < paths.Length; i++) { allTextos.Add(AssetDatabase.LoadAssetAtPath <TextoData>(AssetDatabase.GUIDToAssetPath(paths[i]))); } foreach (TextoData t in allTextos) { string l = t.GetLine(language); for (int i = 0; i < l.Length; i++) { if (!uniqueCharacters.Contains(l[i])) { uniqueCharacters.Add(l[i]); } } if (language == TextoLanguage.Arabic) { l = ArabicFixer.Fix(l); for (int i = 0; i < l.Length; i++) { if (!uniqueCharacters.Contains(l[i])) { uniqueCharacters.Add(l[i]); } } } } return(uniqueCharacters); }
void Start() { Resources.UnloadUnusedAssets(); FixVeriable.PartNumber = -1; FixVeriable.collectNumber = -1; FixVeriable.isPlayerStill = true; FixVeriable.isActivityStart = false; swelling = false; PlayerPrefs.SetInt("scor", 0); if (LanguageHandler.instance.IsRightToLeft) { scoreText.text = PlayerPrefs.GetInt("scor") + " " + ArabicFixer.Fix("" + LanguageManager.Instance.GetTextValue("Score"), false, false); } else if (LanguageHandler.instance.Languages[LanguageHandler.instance.CurrentLanguageIndex].LanguageID == "zh-CN") { scoreText.text = "得分 : " + PlayerPrefs.GetInt("scor"); } else { scoreText.text = "Score : " + PlayerPrefs.GetInt("scor"); } PlayerPrefs.SetInt("Attempt", 0); }
public void BackClicked() { click.Play(); logo.SetActive(true); shopBtn.SetActive(true); decks.SetActive(false); backgrounds.SetActive(false); currentWindow = "0"; string s = AdjustedNumber(PlayerPrefs.GetString("coin", "100").ToString()); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(s); Money2.font = yekta; Money3.font = yekta; } else { Money2.font = myriad; Money3.font = myriad; } Money2.text = s; Money3.text = s; }
public virtual LocalizationItem AddOrUpdateLanguage(string culture, string value) { // Fix Arabic texts when added - fixing them at runtime creates a performance spike due to massive garbage creation. if (culture == Language.ArabicCulture) { value = ArabicFixer.Fix(value); } if (_internalDictionary == null) { _internalDictionary = new Dictionary <string, string>(); } if (_internalDictionary.ContainsKey(culture)) { _internalDictionary[culture] = value; } else { _internalDictionary.Add(culture, value); } return(this); }
public static void FixCartItems() { if (UIMan.cartItemDetailsPanel) { // Setting the item name UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[0].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[0].text); // Setting the item Category UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[1].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[1].text); // Setting the item type UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[2].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[2].text); // Setting the item Description UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[3].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[3].text); // Setting the item Price UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[4].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[4].text); // Setting the item quantity UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[5].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[5].text); // Setting the item seller UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[6].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[6].text); // Setting the item status UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[7].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[7].text); // Setting the item post date UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[8].text = ArabicFixer.Fix(UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[8].text); } }
public void ReflectChanges() { text = ArabicFixer.Fix(m_TextMesh.text, tashkeel, hinduNumbers); m_TextMesh.text = text; }
public static string Fix(string word, bool tashkil, bool hindi) { return(ArabicFixer.Fix(word.Replace("ی", "ي"), tashkil, hindi)); }
// Use this for initialization void Start() { gameObject.GetComponent <Text>().text = "This sentence (wrong display):\n" + text + "\n\nWill appear correctly as:\n" + ArabicFixer.Fix(text, false, false); }
// Use this for initialization void Start() { gameObject.GetComponent <Text>().text = ArabicFixer.Fix(text, false, false); }
// Use this for initialization void Start() { gameObject.GetComponent <Text>().text = ArabicFixer.Fix(text, tashkeel, hinduNumbers); }
// Use this for initialization void Start() { gameObject.GetComponent <GUIText>().text = ArabicFixer.Fix(text); //gameObject.guiText.fontSize = 60; Debug.Log(ArabicSupport.ArabicFixer.Fix("نص عربي على يونيتي، أهلا وسهلا", ShowTashkeel, UseHinduNumbers)); }
public void ViewCartItemDetails() { Debug.Log("Viewing item details ... "); HelpersMan.ShowPanel(UIMan.cartItemDetailsPanel); if (UIMan.cartItemDetailsPanel) { if (Globals.userLanguage == "AR") { // Setting the item name UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[0].text = slotItem.itemName.ToString() + ArabicFixer.Fix("الاسم: "); // Setting the item Category UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[1].text = slotItem.itemCategory.ToString() + ArabicFixer.Fix("الفئة: "); // Setting the item type UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[2].text = slotItem.itemType.ToString() + ArabicFixer.Fix("النوع: "); // Setting the item Description UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[3].text = slotItem.itemDescription.ToString() + ArabicFixer.Fix("الوصف: "); // Setting the item Price UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[4].text = " EGP." + slotItem.itemPrice.ToString() + ArabicFixer.Fix("السعر: "); // Setting the item quantity UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[5].text = slotItem.itemQuantity.ToString() + ArabicFixer.Fix("الكمية: "); // Setting the item seller UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[6].text = slotItem.itemSeller.ToString() + ArabicFixer.Fix("البائع: "); // Setting the item status UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[7].text = slotItem.itemStatus.ToString() + ArabicFixer.Fix("الحالة: "); // Setting the item post date UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[8].text = slotItem.itemPostDate.ToString() + ArabicFixer.Fix("التاريخ: "); //FixCartItems(); UIMan.itemSnapshotsPanel.GetComponent <ItemSnapshotPanelMan>().item = slotItem.ShallowCopy(); UIMan.cartItemDetailsPanel.GetComponent <CartItemDetailsPanelMan>().currentItem = slotItem.ShallowCopy(); } else { // Setting the item name UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[0].text = "Name: " + slotItem.itemName.ToString(); // Setting the item Category UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[1].text = "Category: " + slotItem.itemCategory.ToString(); // Setting the item type UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[2].text = "Type: " + slotItem.itemType.ToString(); // Setting the item Description UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[3].text = "Description: " + slotItem.itemDescription.ToString(); // Setting the item Price UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[4].text = "Price: " + slotItem.itemPrice.ToString() + " EGP."; // Setting the item quantity UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[5].text = "Quantity: " + slotItem.itemQuantity.ToString(); // Setting the item seller UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[6].text = "Seller: " + slotItem.itemSeller.ToString(); // Setting the item status UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[7].text = "Status: " + slotItem.itemStatus.ToString(); // Setting the item post date UIMan.cartItemDetailsPanel.GetComponentsInChildren <Text>()[8].text = "Date: " + slotItem.itemPostDate.ToString(); UIMan.itemSnapshotsPanel.GetComponent <ItemSnapshotPanelMan>().item = slotItem.ShallowCopy(); UIMan.cartItemDetailsPanel.GetComponent <CartItemDetailsPanelMan>().currentItem = slotItem.ShallowCopy(); } } }
public void Fix() { Fixed = ArabicFixer.Fix(Unfixed, ShowTashkeel, UseHinduNumbers); }
public void ChangeText(string dialogue) { DialogueText.text = ArabicFixer.Fix(dialogue, true, true); }
// Token: 0x06000005 RID: 5 RVA: 0x000020A7 File Offset: 0x000004A7 private void Start() { base.gameObject.GetComponent <GUIText>().text = ArabicFixer.Fix(this.text, this.tashkeel, this.hinduNumbers); }
public MakeFriendsQuestionProvider() { currentQuestion = -1; List <ILivingLetterData> correctAnswers; List <ILivingLetterData> wrongAnswers; LL_WordData newWordData1; LL_WordData newWordData2; var wordLetters1 = new List <ILivingLetterData>(); var wordLetters2 = new List <ILivingLetterData>(); var commonLetters = new List <ILivingLetterData>(); var uncommonLetters = new List <ILivingLetterData>(); for (int iteration = 0; iteration < quizzesCount; iteration++) { // Get 2 words with at least 1 common letter int outerLoopAttempts = 50; do { newWordData1 = null; newWordData2 = null; wordLetters1.Clear(); wordLetters2.Clear(); commonLetters.Clear(); uncommonLetters.Clear(); newWordData1 = AppManager.I.Teacher.GetRandomTestWordDataLL(); foreach (var letterData in LanguageSwitcher.I.GetHelper(LanguageUse.Learning).SplitWord(AppManager.I.DB, newWordData1.Data)) { wordLetters1.Add(new LL_LetterData(letterData.letter)); } int innerLoopAttempts = 50; do { newWordData2 = AppManager.I.Teacher.GetRandomTestWordDataLL(); innerLoopAttempts--; } while (newWordData2.Id == newWordData1.Id && innerLoopAttempts > 0); if (innerLoopAttempts <= 0) { UnityEngine.Debug.LogError("MakeFriends QuestionProvider Could not find 2 different words!"); } foreach (var letterData in LanguageSwitcher.I.GetHelper(LanguageUse.Learning).SplitWord(AppManager.I.DB, newWordData2.Data)) { wordLetters2.Add(new LL_LetterData(letterData.letter)); } // Find common letter(s) (without repetition) for (int i = 0; i < wordLetters1.Count; i++) { var letter = wordLetters1[i]; //if (wordLetters2.Contains(letter)) if (wordLetters2.Exists(x => x.Id == letter.Id)) { //if (!commonLetters.Contains(letter)) if (!commonLetters.Exists(x => x.Id == letter.Id)) { commonLetters.Add(letter); } } } // Find uncommon letters (without repetition) for (int i = 0; i < wordLetters1.Count; i++) { var letter = wordLetters1[i]; //if (!wordLetters2.Contains(letter)) if (!wordLetters2.Exists(x => x.Id == letter.Id)) { //if (!uncommonLetters.Contains(letter)) if (!uncommonLetters.Exists(x => x.Id == letter.Id)) { uncommonLetters.Add(letter); } } } for (int i = 0; i < wordLetters2.Count; i++) { var letter = wordLetters2[i]; if (!wordLetters1.Contains(letter)) { if (!uncommonLetters.Contains(letter)) { uncommonLetters.Add(letter); } } } outerLoopAttempts--; } while (commonLetters.Count == 0 && outerLoopAttempts > 0); if (outerLoopAttempts <= 0) { UnityEngine.Debug.LogError("MakeFriends QuestionProvider Could not find enough data for QuestionPack #" + iteration + "\nInfo: Word1: " + ArabicFixer.Fix(newWordData1.TextForLivingLetter) + " Word2: " + ArabicFixer.Fix(newWordData2.TextForLivingLetter) + "\nWordLetters1: " + wordLetters1.Count + " WordLetters2: " + wordLetters2.Count + "\nCommonLetters: " + commonLetters.Count + " UncommonLetters: " + uncommonLetters.Count); } commonLetters.Shuffle(); uncommonLetters.Shuffle(); correctAnswers = new List <ILivingLetterData>(commonLetters); wrongAnswers = new List <ILivingLetterData>(uncommonLetters); var currentPack = new MakeFriendsQuestionPack(newWordData1, newWordData2, wrongAnswers, correctAnswers); questions.Add(currentPack); } }
public string GetFixedString(string str) { return(ArabicFixer.Fix(str, ShowTashkeel, UseHinduNumbers)); }
void Update() { gameObject.GetComponent <TextMeshProUGUI>().text = ArabicFixer.Fix(text, tashkeel, hinduNumbers); }
void OnEnable() { string s; if (deck.oppsRoundsWon >= 7) { okBtn.SetActive(true); walletObj.SetActive(false); yourRounds.gameObject.SetActive(true); oppsRounds.gameObject.SetActive(true); moneyEarned.gameObject.SetActive(true); moneyLost.gameObject.SetActive(true); s = "You lost this game"; loseMsg.font = deck.myriad; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = "!ﺪﻴﺘﺧﺎﺑ ﺍﺭ ﯼﺯﺎﺑ ﻦﻳﺍ ﺎﻤﺷ"; loseMsg.font = deck.yekta; } loseMsg.text = s; s = deck.AdjustedNumber(PlayerPrefs.GetString("coin", "100")); loseAmount.font = deck.myriad; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(s); loseAmount.font = deck.yekta; } loseAmount.color = Color.white; loseAmount.text = s; s = "Your Rounds: " + deck.friendsRoundsWon.ToString(); yourRounds.font = deck.myriad; yourRounds.alignment = TextAnchor.MiddleLeft; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.friendsRoundsWon.ToString()) + " :ﺎﻤﺷ ﻩﺩﺮﺑ ﯼﺎﻫ ﺖﺳﺩ"; yourRounds.font = deck.yekta; yourRounds.alignment = TextAnchor.MiddleRight; } yourRounds.text = s; oppsRounds.font = deck.myriad; oppsRounds.alignment = TextAnchor.MiddleLeft; s = "Opps Rounds: " + deck.oppsRoundsWon.ToString(); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.oppsRoundsWon.ToString()) + " :ﻒﻳﺮﺣ ﻩﺩﺮﺑ ﯼﺎﻫ ﺖﺳﺩ"; oppsRounds.font = deck.yekta; oppsRounds.alignment = TextAnchor.MiddleRight; } oppsRounds.text = s; moneyLost.font = deck.myriad; moneyLost.alignment = TextAnchor.MiddleLeft; s = "Total lose: " + deck.totalLose.ToString(); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.AdjustedNumber(deck.totalLose.ToString())) + " :ﻩﺩﺍﺩ ﺖﺳﺩ ﺯﺍ ﻪﮑﺳ ﻉﻮﻤﺠﻣ"; moneyLost.font = deck.yekta; moneyLost.alignment = TextAnchor.MiddleRight; } moneyLost.text = s; moneyEarned.font = deck.myriad; moneyEarned.alignment = TextAnchor.MiddleLeft; s = "Total Wins: " + deck.totalWin.ToString(); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.AdjustedNumber(deck.totalWin.ToString())) + " :ﻩﺩﺭﻭﺁ ﺖﺳﺩ ﻪﺑ ﻪﮑﺳ ﻉﻮﻤﺠﻣ"; moneyEarned.font = deck.yekta; moneyEarned.alignment = TextAnchor.MiddleRight; } moneyEarned.text = s; } else { walletObj.SetActive(true); yourRounds.gameObject.SetActive(false); oppsRounds.gameObject.SetActive(false); moneyEarned.gameObject.SetActive(false); moneyLost.gameObject.SetActive(false); loseMsg.text = "You lost"; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { loseMsg.text = "!ﺪﻴﺘﺧﺎﺑ ﺎﻤﺷ"; loseMsg.font = deck.yekta; } loseAmount.color = Color.red; s = deck.AdjustedNumber(deck.betAmount.ToString()); loseAmount.font = deck.myriad; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(s); loseAmount.font = deck.yekta; } loseAmount.text = s; s = deck.AdjustedNumber(PlayerPrefs.GetString("coin", "100")); wallet.font = deck.myriad; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(s); wallet.font = deck.yekta; } wallet.text = s; startmoney = int.Parse(PlayerPrefs.GetString("coin", "100")) + deck.betAmount; money = int.Parse(PlayerPrefs.GetString("coin", "100")); jump = deck.betAmount / 30; } }
public static string FixMyArabic(string source) { string temp = ArabicFixer.Fix(source); return(ReverseText(temp));; }
void OnGUI() { if (Test.available) { if (GUI.Button(new Rect(250, 50, 200, 100), "Show Ad")) { Test.available = false; TapsellShowOptions options = new TapsellShowOptions(); options.backDisabled = false; options.immersiveMode = false; options.rotationMode = TapsellShowOptions.ROTATION_LOCKED_LANDSCAPE; options.showDialog = true; Tapsell.showAd(ad, options); } } if (GUI.Button(new Rect(50, 50, 200, 100), "Request Video Ad")) { requestAd("5873510bbc5c28f9d90ce98d", false); } if (GUI.Button(new Rect(50, 250, 200, 100), "Request Interstitial Ad")) { requestAd("598eadad468465085986d07e", false); } if (GUI.Button(new Rect(50, 350, 200, 100), "Toggle Banner Visibility")) { if (bannerIsHidden) { Tapsell.showBannerAd(bannerZoneId); } else { Tapsell.hideBannerAd(bannerZoneId); } bannerIsHidden = !bannerIsHidden; } #if UNITY_ANDROID && !UNITY_EDITOR if (Test.nativeAd == null) { if (GUI.Button(new Rect(50, 150, 200, 100), "Request Banner Ad")) { requestNativeBannerAd("59b6903e468465281bde0d25"); } } if (Test.nativeAd != null) { GUIStyle titleStyle = new GUIStyle(); titleStyle.alignment = TextAnchor.UpperRight; GUI.Label(new Rect(50, 250, 450, 30), ArabicFixer.Fix(Test.nativeAd.getTitle(), true), titleStyle); GUIStyle descriptionStyle = new GUIStyle(); descriptionStyle.richText = true; descriptionStyle.alignment = TextAnchor.MiddleRight; GUI.Label(new Rect(50, 280, 450, 20), ArabicFixer.Fix(Test.nativeAd.getDescription(), true), descriptionStyle); GUI.DrawTexture(new Rect(500, 250, 50, 50), Test.nativeAd.getIcon()); Rect callToActionRect; if (Test.nativeAd.getLandscapeBannerImage() != null) { GUI.DrawTexture(new Rect(50, 300, 500, 280), Test.nativeAd.getLandscapeBannerImage()); callToActionRect = new Rect(50, 580, 500, 50); } else if (Test.nativeAd.getPortraitBannerImage() != null) { GUI.DrawTexture(new Rect(50, 300, 500, 280), Test.nativeAd.getPortraitBannerImage()); callToActionRect = new Rect(50, 580, 500, 50); } else { callToActionRect = new Rect(50, 300, 500, 50); } Test.nativeAd.onShown(); if (GUI.Button(callToActionRect, ArabicFixer.Fix(Test.nativeAd.getCallToAction(), true))) { Test.nativeAd.onClicked(); } } #endif }
public static string Fix(string word, bool rtl) { return(ArabicFixer.Fix(word.Replace("ی", "ي"), rtl)); }
string ArabicNumber(int num) { return(ArabicFixer.Fix(num + "", false, true)); }
public static string Fix(string word) { return(ArabicFixer.Fix(word.Replace("ی", "ي"))); }
// Use this for initialization void OnEnable() { if (deck.friendsRoundsWon >= 7) { yourRounds.gameObject.SetActive(true); oppsRounds.gameObject.SetActive(true); moneyEarned.gameObject.SetActive(true); moneyLost.gameObject.SetActive(true); winmessage.text = "You Won!"; winmessage.font = deck.myriad; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { winmessage.text = "!ﺪﻳﺩﺮﺑ ﺎﻤﺷ"; winmessage.font = deck.yekta; } string s = "Your Rounds: " + deck.friendsRoundsWon.ToString(); yourRounds.font = deck.myriad; yourRounds.alignment = TextAnchor.MiddleLeft; if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.friendsRoundsWon.ToString()) + " :ﺎﻤﺷ ﻩﺩﺮﺑ ﯼﺎﻫ ﺖﺳﺩ"; yourRounds.font = deck.yekta; yourRounds.alignment = TextAnchor.MiddleRight; } yourRounds.text = s; oppsRounds.font = deck.myriad; oppsRounds.alignment = TextAnchor.MiddleLeft; s = "Opps Rounds: " + deck.oppsRoundsWon.ToString(); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.oppsRoundsWon.ToString()) + " :ﻒﻳﺮﺣ ﻩﺩﺮﺑ ﯼﺎﻫ ﺖﺳﺩ"; oppsRounds.font = deck.yekta; oppsRounds.alignment = TextAnchor.MiddleRight; } oppsRounds.text = s; moneyLost.font = deck.myriad; moneyLost.alignment = TextAnchor.MiddleLeft; s = "Total lose: " + deck.totalLose.ToString(); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.AdjustedNumber(deck.totalLose.ToString())) + " :ﻩﺩﺍﺩ ﺖﺳﺩ ﺯﺍ ﻪﮑﺳ ﻉﻮﻤﺠﻣ"; moneyLost.font = deck.yekta; moneyLost.alignment = TextAnchor.MiddleRight; } moneyLost.text = s; moneyEarned.font = deck.myriad; moneyEarned.alignment = TextAnchor.MiddleLeft; s = "Total Wins: " + deck.totalWin.ToString(); if (PlayerPrefs.GetInt("usinglang", 0) == 1) { s = ArabicFixer.Fix(deck.AdjustedNumber(deck.totalWin.ToString())) + " :ﻩﺩﺭﻭﺁ ﺖﺳﺩ ﻪﺑ ﻪﮑﺳ ﻉﻮﻤﺠﻣ"; moneyEarned.font = deck.yekta; moneyEarned.alignment = TextAnchor.MiddleRight; } moneyEarned.text = s; } else { yourRounds.gameObject.SetActive(false); oppsRounds.gameObject.SetActive(false); moneyEarned.gameObject.SetActive(false); moneyLost.gameObject.SetActive(false); } winSound.Play(); win = deck.winAmount; winAmount.text = deck.AdjustedNumber(PlayerPrefs.GetString("coin", "100")); startCounter = int.Parse(PlayerPrefs.GetString("coin", "100")) - win; money = int.Parse(PlayerPrefs.GetString("coin", "100")); counterJump = win / 45; okBtn.SetActive(false); StartCoroutine(CoinEmition()); endMoney = money; StartCoroutine(addMoney()); }