public void AcceptOffer() { SoundManager.instance.Click(); if (giftAmount == 0) { questPopup.Find("GiftSection/HintDiscountText").GetComponent <Text>().text = LanguageScript.AdventureHintDiscountText.Replace("%@", "50"); questPopup.Find("GiftSection/HintDiscountText").gameObject.SetActive(value: true); ArabicController.MakeArabicMenu(questPopup.Find("GiftSection/HintDiscountText")); PlayerPrefsManager.SetHintDiscountTime(DateTime.Now.AddDays(givenHours).ToString()); } else { questPopup.Find("GiftSection/GemRewardHolder/AmountText").GetComponent <Text>().text = giftAmount.ToString(); ArabicController.MakeArabicMenu(questPopup.Find("GiftSection/GemRewardHolder/AmountText")); questPopup.Find("GiftSection/GemRewardHolder").gameObject.SetActive(value: true); PlayerPrefsManager.SetCoin(PlayerPrefsManager.GetCoin() + giftAmount); } StartCoroutine(AcceptThread()); DateTime dateTime = DateTime.Now.AddDays(givenHours); PlayerPrefsManager.SetQuestEndTime(dateTime.ToString()); NotificationSystem.CreateQuestLastTwoHoursNotification((int)(dateTime.AddHours(-2.0) - DateTime.Now).TotalSeconds); NotificationSystem.DisableQuestReadyNotifications(); SetQuestButton(); }
private IEnumerator IncreaseCoinAnimThread(float delay, bool withSound = true) { yield return(new WaitForSeconds(delay)); int currentCoin = int.Parse(coinText.text); if (withSound) { StartCoroutine(IncreaseCoinSoundThread()); } while (true) { currentCoin = ((PlayerPrefsManager.GetCoin() - currentCoin <= 50) ? (currentCoin + 5) : (currentCoin + 50)); coinText.text = currentCoin.ToString(); wheelCoinText.text = currentCoin.ToString(); if (currentCoin >= PlayerPrefsManager.GetCoin()) { break; } ArabicController.MakeArabicMenu(coinText.transform); ArabicController.MakeArabicMenu(wheelCoinText.transform); yield return(new WaitForSeconds(0.03f)); } coinText.text = PlayerPrefsManager.GetCoin().ToString(); wheelCoinText.text = PlayerPrefsManager.GetCoin().ToString(); StartCoroutine(FugoUtils.Scaler(Vector3.one * 1.2f, 0.1f, coinText.transform.parent)); StartCoroutine(FugoUtils.Scaler(Vector3.one * 1.2f, 0.1f, wheelCoinText.transform)); yield return(new WaitForSeconds(0.1f)); StartCoroutine(FugoUtils.Scaler(Vector3.one * 1f, 0.1f, coinText.transform.parent)); StartCoroutine(FugoUtils.Scaler(Vector3.one * 1f, 0.1f, wheelCoinText.transform)); }
public void OpenQuestPopup(string type) { DisableAll(); int index = FugoUtils.getLevelInfo(PlayerPrefsManager.GetQuestEndLevel() - 1)[0]; int index2 = FugoUtils.getLevelInfo(PlayerPrefsManager.GetQuestEndLevel() - 1)[1]; string setFullName = Games.sections[index].sets[index2].SetFullName; if (type.ToLower() == "offer") { string newValue = "<color=#FFC687FF>" + setFullName + "</color>"; if (PlayerPrefsManager.GetLang() == "Arabic" || PlayerPrefsManager.GetLang() == "Hebrew") { newValue = setFullName; } if (givenHours > 1) { questPopup.Find("QuestSection/QuestText").GetComponent <Text>().text = LanguageScript.AdventureQuestText.Split('/')[1].Replace("%@", givenHours.ToString()).Replace("@%", newValue); } else { questPopup.Find("QuestSection/QuestText").GetComponent <Text>().text = LanguageScript.AdventureQuestText.Split('/')[0].Replace("%@", givenHours.ToString()).Replace("@%", newValue); } questPopup.Find("QuestSection").gameObject.SetActive(value: true); ArabicController.MakeArabicMenu(questPopup.Find("QuestSection/QuestText")); } else if (type.ToLower() == "gift") { questPopup.Find("GiftSection").gameObject.SetActive(value: true); } else if (type.ToLower() == "info") { string text = "<color=#FFC687FF>" + setFullName + "</color>"; if (PlayerPrefsManager.GetLang() == "Arabic" || PlayerPrefsManager.GetLang() == "Hebrew") { text = setFullName; } questPopup.Find("InfoSection/QuestSection").GetComponent <Text>().text = text; questPopup.Find("InfoSection/RemainingLevel").GetComponent <Text>().text = LanguageScript.AdventureRemainingText.Replace("%@", (PlayerPrefsManager.GetQuestEndLevel() - PlayerPrefsManager.GetLevel()).ToString()); TimeSpan ts = DateTime.Parse(PlayerPrefsManager.GetQuestEndTime()) - DateTime.Now; questPopup.Find("InfoSection/RemainingTime").GetComponent <Text>().text = LanguageScript.AdventureRemainingTimeText.Replace("%@", FugoUtils.DateFormatterLong(LanguageScript.DayHourText, ts)); questPopup.Find("InfoSection").gameObject.SetActive(value: true); ArabicController.MakeArabicMenu(questPopup.Find("InfoSection/QuestSection")); ArabicController.MakeArabicMenu(questPopup.Find("InfoSection/RemainingLevel")); ArabicController.MakeArabicMenu(questPopup.Find("InfoSection/RemainingTime")); } else if (type.ToLower() == "reward") { questPopup.Find("RewardSection/GemRewardHolder/AmountText").GetComponent <Text>().text = PlayerPrefsManager.GetQuestRewardAmount().ToString(); ArabicController.MakeArabicMenu(questPopup.Find("RewardSection/GemRewardHolder/AmountText")); questPopup.Find("RewardSection").gameObject.SetActive(value: true); } else if (type.ToLower() == "fail") { questPopup.Find("FailSection").gameObject.SetActive(value: true); } MenuController.instance.OpenQuestPopup(); }
public void SetVersionText() { versionText.text = LanguageScript.BuildText + " " + Application.version; if (PlayerPrefsManager.GetFBID() != string.Empty) { Text text = versionText; text.text = text.text + "\n" + PlayerPrefsManager.GetFBID(); facebookButton.parent.gameObject.SetActive(value: false); } ArabicController.MakeArabicMenu(versionText.transform); }
public void CreateLevels(LevelSet set, bool isBlur = false) { if (isBlur) { bg.sprite = Resources.Load <Sprite>("BGImages/" + set.bgImage); } else { bg.sprite = Resources.Load <Sprite>("BGImages/" + set.bgImage); } CreateEmptyLevels(set.levels.Count); title.text = set.SetFullName; title.color = FugoUtils.HexToColor(set.TitleColor); ribbon.color = FugoUtils.HexToColor(set.RibbonColor); FugoUtils.ChangeAlpha(ribbon, 0f); FugoUtils.ChangeAlpha(title, 0f); FugoUtils.ChangeAlpha(levelsBG.GetComponent <Image>(), 0f); FugoUtils.ChangeAlpha(bg, 0f); Vector2 sizeDelta = levelsBG.GetComponent <RectTransform>().sizeDelta; sizeDelta.y = GetSizeOfBG(set.levels.Count); levelsBG.GetComponent <RectTransform>().sizeDelta = sizeDelta; int num = set.FirstLevel; for (int i = 0; i < set.levels.Count; i++) { Transform child = levelHolder.GetChild(i); child.name = num.ToString(); if (num == PlayerPrefsManager.GetLevel()) { SetLevelProperties(child, set, "current"); PlaceLetters(child.Find("TextHolder"), set.levels[i].letters); } else if (num > PlayerPrefsManager.GetLevel()) { SetLevelProperties(child, set, "locked"); } else if (num < PlayerPrefsManager.GetLevel()) { SetLevelProperties(child, set, "completed"); PlaceLetters(child.Find("TextHolder"), set.levels[i].letters); } child.gameObject.SetActive(value: true); num++; } levelHolder.parent.parent.gameObject.SetActive(value: true); StartCoroutine(AnimateSetScreen(0.001f)); ArabicController.MakeArabicMenu(levelHolder.parent.parent); }
private void Init() { months = LanguageScript.MonthNames.Split(','); gainedStarText.text = PlayerPrefsManager.GetEarnedStar().ToString(); starHolder.transform.localScale = Vector3.one; if (PlayerPrefsManager.GetEarnedStar() == 0) { starHolder.gameObject.SetActive(value: false); nextButton.SetActive(value: false); popupButton.SetActive(value: true); } else { nextButton.SetActive(value: true); popupButton.SetActive(value: false); } panel.GetComponent <Image>().color = new Color(1f, 1f, 1f, 0f); int num = DateTime.Now.Month; num--; try { month.text = months[num]; } catch { } if (PlayerPrefsManager.GetLang() == "Arabic" || PlayerPrefsManager.GetLang() == "Hebrew") { UnityEngine.Object.Destroy(country.GetComponent <ArabicText>()); } country.text = Games.sections[num].Title; Image image = bwImg; Sprite sectionBGImage = SectionController.instance.GetSectionBGImage(Games.sections[num].BGName); normalImg.sprite = sectionBGImage; image.sprite = sectionBGImage; float curPerc = (float)PlayerPrefsManager.GetDailyProcess() / (float)totalKeys; CreateGifts(curPerc, num); if (PlayerPrefsManager.GetGalleryString().Length == 0) { galleryButton.gameObject.SetActive(value: false); } ArabicController.MakeArabicMenu(month.transform); }
public void CreateLangButtons() { IEnumerator enumerator = langHolder.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform transform = (Transform)enumerator.Current; UnityEngine.Object.Destroy(transform.gameObject); } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } int num = 0; float num2 = -207f; float num3 = 207f; float num4 = 245f; float num5 = -80f; foreach (Language language in languages) { Transform t = UnityEngine.Object.Instantiate(languagePrefab, langHolder).transform; t.localScale = Vector3.one; Vector3 localPosition = new Vector3(num2 + (float)(num % 3) * num3, num4 + (float)(num / 3) * num5, 0f); t.localPosition = localPosition; t.name = language.name; t.Find("Text").GetComponent <Text>().text = language.localname; t.GetComponent <Button>().onClick.AddListener(delegate { LangButtonOnClick(t); }); num++; if (language.id == "AR" || language.id == "HE") { ArabicController.MakeForceArabic(t); } } }
public void SetTexts(string type = "") { if (type == "facebook") { if (PlayerPrefsManager.GetFBID() == string.Empty) { fbtext.text = LanguageScript.LoginText; } else { fbtext.text = LanguageScript.LogoutText; } ArabicController.MakeArabicMenu(fbtext.transform.parent); return; } playButton.text = LanguageScript.PlayText; exploreButton.text = LanguageScript.ExploreText; dailyPuzzleButton.text = LanguageScript.DailyPuzzleText; settingsTitle.text = LanguageScript.SettingsText; soundText.text = LanguageScript.SoundText; shopButtonText.text = LanguageScript.LanguageText; restorePurchaseText.text = LanguageScript.RestorePurchasesText; redeemText.text = LanguageScript.RedeemHeader; dailyPlayButton.text = LanguageScript.PlayText; dailyNextButton.text = LanguageScript.NextText; dailyPopup.text = LanguageScript.ComeLaterText; dailyPopupHeader.text = LanguageScript.DailyPuzzleText; shopTitle.text = LanguageScript.ShopText; rewardedPopupText.text = LanguageScript.FreeCoinText; rewardedPopupButton.text = LanguageScript.WatchText; prizePopupHeader.text = LanguageScript.DailyPuzzleText; prizePopupCongratz.text = LanguageScript.CongratulationsText; prizePopupCollect.text = LanguageScript.CollectText; dailyGalleryHeader.text = LanguageScript.DailyPuzzleGalleryHeader; supportButtonText.text = LanguageScript.SupportText; dailyRewardInfo.text = LanguageScript.DailyRewardContentText; dailyRewardTitle.text = LanguageScript.DailyRewardTitleText; dailyRewardCollect.text = LanguageScript.CollectText; dailyRewardCongratz.text = LanguageScript.CongratulationsText; if (PlayerPrefsManager.GetPro()) { LanguageScript.DailyGiftHalfPriceHint = LanguageScript.DailyGiftHalfPriceHint.Replace("1", "2"); } dailyRewardHalfPriceHint.text = LanguageScript.DailyGiftHalfPriceHint; dailyPuzzleOKText.text = LanguageScript.OKText; setCompletedTutorialText.text = LanguageScript.SetCompletedTutorial; newText.text = LanguageScript.NewText; if (PlayerPrefsManager.GetFBID() == string.Empty) { fbtext.text = LanguageScript.LoginText; } else { fbtext.text = LanguageScript.LogoutText; } musicText.text = LanguageScript.MusicText; questGiftHeaderText.text = LanguageScript.CongratulationsText; questGiftContentText.text = LanguageScript.AdventureGiftText; questGiftCollectText.text = LanguageScript.CollectText; questHeaderText.text = LanguageScript.AdventureTitleText; questYesText.text = LanguageScript.YesText; questNoText.text = LanguageScript.NoText; questInfoHeaderText.text = LanguageScript.AdventureTitleText; questInfoOKText.text = LanguageScript.OKText; questRewardHeaderText.text = LanguageScript.CongratulationsText; questRewardContentText.text = LanguageScript.AdventureRewardText; questRewardOKText.text = LanguageScript.CollectText; questFailHeaderText.text = LanguageScript.SorryText; questFailContentText.text = LanguageScript.AdventureFailText; questFailOKText.text = LanguageScript.OKText; proHintText.text = LanguageScript.ProFreeHintText; proNoAdText.text = LanguageScript.ProNoAdText; proGiftText.text = LanguageScript.ProDoubleDailyText; becomeProText.text = LanguageScript.BecomeProText; proTermsText.text = LanguageScript.PrivacyPolicyText; redeemOKText.text = LanguageScript.OKText; redeemCollectText.text = LanguageScript.CollectText; redeemCongratzText.text = LanguageScript.CongratulationsText; redeemExplanationText.text = LanguageScript.RedeemInstruction; redeemPlaceholderText.text = LanguageScript.RedeemPlaceholder; adventureHeder.text = LanguageScript.HiddenLevelHeaderText; adventureContent.text = LanguageScript.HiddenLevelContentText; if (ThemeManager.theme == 0) { try { SunScript.instance.SetBrillianceText(); } catch (Exception) { } } SetBrillianceText(); MenuController.instance.SetLangText(); wheelSpinText.text = LanguageScript.WheelSpinText; wheelNoThanksText.text = LanguageScript.WheelNoThanksText; wheelHintPopupText.text = LanguageScript.DailyGiftHalfPriceHint; trialProHintText.text = LanguageScript.ProFreeHintText; trialProNoadText.text = LanguageScript.ProNoAdText; trialProGiftText.text = LanguageScript.ProDoubleDailyText; trialBecomeProText.text = LanguageScript.BecomeProText; trialProTermsText.text = LanguageScript.PrivacyPolicyText; trialProOneTimeText.text = LanguageScript.ProOneTimeOfferText; trialProSpecialOfferText.text = LanguageScript.SpecialOfferText; sectionHeader.text = LanguageScript.ExploreText; ArabicController.MakeArabicMenu(GameObject.Find("Canvas").transform); if (PlayerPrefsManager.GetLang() == "Arabic") { shopTitle.transform.localScale = new Vector3(-1f, 1f, 1f); shopTitle.transform.parent.localScale = new Vector3(-1f, 1f, 1f); } else { shopTitle.transform.localScale = new Vector3(1f, 1f, 1f); shopTitle.transform.parent.localScale = new Vector3(1f, 1f, 1f); } SetTextProperties(); if (!textSizesFixed && ThemeManager.theme == 1) { textSizesFixed = true; List <Text> list = new List <Text>(); list.Add(playButton); list.Add(exploreButton); list.Add(dailyPuzzleButton); StartCoroutine(FugoUtils.SetSameTextSize(list, canvas)); } }
public void SetQuestButton() { NewQuestButtonBG(condition: false); if (PlayerPrefsManager.GetLevel() >= PlayerPrefsManager.CountLevels() - 1) { questButton.gameObject.SetActive(value: false); return; } questButton.GetComponent <Button>().onClick.RemoveAllListeners(); if (PlayerPrefsManager.GetQuestEndTime() == string.Empty) { if (DateTime.Now.ToString("yy-MM-dd") != PlayerPrefsManager.GetLastQuestTime() && DateTime.Now.Day % 2 == 0 && PlayerPrefsManager.GetLevel() > 20) { if (!MenuController.fromDaily) { questButton.gameObject.SetActive(value: true); } questButton.Find("Frame/Text").gameObject.SetActive(value: false); questButton.Find("Frame/Cross").gameObject.SetActive(value: false); questButton.Find("Frame/Check").gameObject.SetActive(value: false); questButton.GetComponent <Button>().onClick.AddListener(delegate { GiveQuest(); }); StartCoroutine(AnimateQuestButton()); } else { questButton.gameObject.SetActive(value: false); } } else { if (!MenuController.fromDaily) { questButton.gameObject.SetActive(value: true); } if (DateTime.Compare(DateTime.Now, DateTime.Parse(PlayerPrefsManager.GetQuestEndTime())) < 0 && PlayerPrefsManager.GetLevel() < PlayerPrefsManager.GetQuestEndLevel()) { TimeSpan ts = DateTime.Parse(PlayerPrefsManager.GetQuestEndTime()) - DateTime.Now; questButton.Find("Frame/Text").GetComponent <Text>().text = FugoUtils.DateFormatter(LanguageScript.DHText, ts); if (ThemeManager.theme == 1) { questButton.Find("Frame/Text").GetComponent <Text>().text = FugoUtils.DateFormatterNewTheme(null, ts); } ArabicController.MakeArabicMenu(questButton.Find("Frame/Text")); questButton.Find("Frame/Text").gameObject.SetActive(value: true); questButton.Find("Frame/Cross").gameObject.SetActive(value: false); questButton.Find("Frame/Check").gameObject.SetActive(value: false); questButton.GetComponent <Button>().onClick.AddListener(delegate { OpenQuestPopup("info"); }); } else { NewQuestButtonBG(condition: true); if (PlayerPrefsManager.GetQuestCompleted() == 0) { questButton.Find("Frame/Text").gameObject.SetActive(value: false); questButton.Find("Frame/Cross").gameObject.SetActive(value: true); questButton.Find("Frame/Check").gameObject.SetActive(value: false); questButton.GetComponent <Button>().onClick.AddListener(delegate { OpenQuestPopup("fail"); }); StartCoroutine(AnimateQuestButton()); } else { questButton.Find("Frame/Text").gameObject.SetActive(value: false); questButton.Find("Frame/Cross").gameObject.SetActive(value: false); questButton.Find("Frame/Check").gameObject.SetActive(value: true); questButton.GetComponent <Button>().onClick.AddListener(delegate { OpenQuestPopup("reward"); }); StartCoroutine(AnimateQuestButton()); } } } if (questButton.Find("Frame/BG") != null) { questButton.Find("Frame/BG").gameObject.SetActive(questButton.Find("Frame/Text").gameObject.activeSelf); } ArabicController.MakeArabicMenu(questButton.Find("Frame/Text").parent); }
public void SetCoinText() { coinText.text = PlayerPrefsManager.GetCoin().ToString(); ArabicController.MakeArabicMenu(coinText.transform); }
public void CreateSlices() { IEnumerator enumerator = sliceHolder.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform transform = (Transform)enumerator.Current; UnityEngine.Object.Destroy(transform.gameObject); } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } float num = 0f; for (int i = 0; i < percentages.Length; i++) { Transform transform2 = UnityEngine.Object.Instantiate(slicePrefab, sliceHolder).transform; transform2.localScale = Vector3.one; transform2.name = i.ToString(); transform2.GetComponent <Image>().fillAmount = (float)percentages[i] / 360f; transform2.localRotation = Quaternion.Euler(0f, 0f, 360f - num); transform2.GetComponent <Image>().color = FugoUtils.HexToColor(colors[i]); num += (float)percentages[i]; transform2.Find("PrizeHolder").localRotation = Quaternion.Euler(0f, 0f, (float)(-percentages[i]) / 2f); transform2.Find("PrizeHolder").localPosition = new Vector3(Mathf.Sin((float)percentages[i] / 2f * ((float)Math.PI / 180f)), Mathf.Cos((float)percentages[i] / 2f * ((float)Math.PI / 180f)), 0f) * 105f; transform2.Find("PrizeHolder/AmountText").GetComponent <Text>().text = Mathf.Abs(prizes[i]).ToString(); if (prizes[i] > 0) { transform2.Find("PrizeHolder/CoinHolder").gameObject.SetActive(value: true); transform2.Find("PrizeHolder/HintHolder").gameObject.SetActive(value: false); transform2.Find("PrizeHolder/GiftHolder").gameObject.SetActive(value: false); } else if (prizes[i] < 0) { transform2.Find("PrizeHolder/CoinHolder").gameObject.SetActive(value: false); transform2.Find("PrizeHolder/AmountText").gameObject.SetActive(value: false); transform2.Find("PrizeHolder/HintHolder").gameObject.SetActive(value: true); transform2.Find("PrizeHolder/GiftHolder").gameObject.SetActive(value: false); transform2.Find("PrizeHolder/HintHolder").localPosition = new Vector3(0f, 67f, 0f); } else { transform2.Find("PrizeHolder/GiftHolder").gameObject.SetActive(value: true); transform2.Find("PrizeHolder/CoinHolder").gameObject.SetActive(value: true); transform2.Find("PrizeHolder/AmountText").gameObject.SetActive(value: true); transform2.Find("PrizeHolder/AmountText").GetComponent <Text>().text = "100"; transform2.Find("PrizeHolder/HintHolder").gameObject.SetActive(value: false); transform2.Find("PrizeHolder/AmountText").localPosition = new Vector3(0f, 16f, 0f); transform2.Find("PrizeHolder/AmountText").GetComponent <Text>().resizeTextForBestFit = false; transform2.Find("PrizeHolder/AmountText").GetComponent <Text>().fontSize = 30; transform2.Find("PrizeHolder/CoinHolder").localPosition = new Vector3(0f, -24f, 0f); transform2.Find("PrizeHolder/CoinHolder").localScale = Vector3.one * 0.8f; transform2.Find("Pattern").gameObject.SetActive(value: true); transform2.GetComponent <Image>().color = FugoUtils.HexToColor("3C00FF"); } ArabicController.MakeArabicMenu(transform2); } AnimateBG(); SetCoinText(); SetSpinButton(); }
private void Awake() { instance = this; }
public void CreateShopItems() { IEnumerator enumerator = list.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform transform = (Transform)enumerator.Current; UnityEngine.Object.Destroy(transform.gameObject); } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } Vector3 zero = Vector3.zero; int[] array = order; foreach (int num in array) { Transform t = UnityEngine.Object.Instantiate(shopItemPrefab, list).transform; t.localPosition = zero; t.localScale = Vector3.one; t.Find("ShopImage").GetComponent <Image>().sprite = shopImages[num]; t.Find("TitleText").GetComponent <Text>().text = titles[num]; t.Find("DescText").GetComponent <Text>().text = descs[num]; t.Find("BuyButton").GetComponent <Button>().onClick.AddListener(delegate { ButtonCallback(t.Find("TitleText").GetComponent <Text>().text); }); t.Find("BuyButton/Text").GetComponent <Text>().text = itemPrices[num]; if (num % 2 == 1) { t.GetComponent <Image>().color = FugoUtils.HexToColor("96969636"); } if (num == 3) { t.Find("BadgeImage").GetComponent <Image>().sprite = badges[0]; t.Find("BadgeImage/Text").GetComponent <Text>().text = badgeTexts[0]; t.Find("BadgeImage").gameObject.SetActive(value: true); if (UISwapper.flipGame) { t.Find("BadgeImage").GetComponent <RectTransform>().anchoredPosition = Vector2.left * 70f + Vector2.up * 23.4f; } } if (num == 5) { t.Find("BadgeImage").GetComponent <Image>().sprite = badges[1]; t.Find("BadgeImage/Text").GetComponent <Text>().text = badgeTexts[1]; t.Find("BadgeImage").gameObject.SetActive(value: true); if (UISwapper.flipGame) { t.Find("BadgeImage").GetComponent <RectTransform>().anchoredPosition = Vector2.left * 70f + Vector2.up * 23.4f; } } if (num == 6) { t.Find("BadgeImage").GetComponent <Image>().sprite = badges[2]; t.Find("BadgeImage/Text").GetComponent <Text>().text = badgeTexts[2]; t.Find("BadgeImage").gameObject.SetActive(value: true); t.Find("BuyButton/Text").GetComponent <Text>().text = LanguageScript.BecomeProText; if (UISwapper.flipGame) { t.Find("BadgeImage").GetComponent <RectTransform>().anchoredPosition = Vector2.left * 70f + Vector2.up * 23.4f; } } zero.y -= 120f; if (PlayerPrefsManager.GetLang() == "Hebrew") { ArabicController.MakeArabicMenu(t); } } if (UISwapper.flipGame) { Text[] allComponents = list.GetAllComponents <Text>(); Text[] array2 = allComponents; foreach (Text text in array2) { Vector3 localScale = text.transform.localScale; localScale.x *= -1f; text.transform.localScale = localScale; string text2 = text.text; ArabicText arabicText = text.gameObject.AddComponent <ArabicText>(); arabicText.Text = text2; } } if (SceneManager.GetActiveScene().name == "Menu") { GameObject gameObject = GameObject.Find("Canvas"); gameObject.transform.Find("PopupHolder/ProPopup/ProButton/PriceText").GetComponent <Text>().text = itemPrices[6] + " / " + LanguageScript.WeeklyText; gameObject.transform.Find("PopupHolder/ProPopup/DescriptionText").GetComponent <Text>().text = LanguageScript.ProContentText.Replace("%@", itemPrices[6]); gameObject.transform.Find("PopupHolder/TrialProPopup/ProButton/PriceText").GetComponent <Text>().text = LanguageScript.FreeTrialText.Replace("%@", itemPrices[7]); gameObject.transform.Find("PopupHolder/TrialProPopup/DescriptionText").GetComponent <Text>().text = LanguageScript.ProContentText.Replace("%@", itemPrices[7]); if (PlayerPrefsManager.GetPro()) { gameObject.transform.Find("PopupHolder/ProPopup/ProButton/PriceText").GetComponent <Text>().text = LanguageScript.AlreadyPurchasedText; gameObject.transform.Find("PopupHolder/ProPopup/ProButton/PriceText").GetComponent <Text>().color = Color.white; gameObject.transform.Find("PopupHolder/ProPopup/ProButton").GetComponent <Button>().interactable = false; gameObject.transform.Find("PopupHolder/ProPopup/DescriptionText").GetComponent <Text>().text = LanguageScript.ProContentText.Replace("%@", itemPrices[6]); gameObject.transform.Find("PopupHolder/TrialProPopup/ProButton/PriceText").GetComponent <Text>().text = LanguageScript.AlreadyPurchasedText; gameObject.transform.Find("PopupHolder/TrialProPopup/ProButton/PriceText").GetComponent <Text>().color = Color.white; gameObject.transform.Find("PopupHolder/TrialProPopup/ProButton").GetComponent <Button>().interactable = false; gameObject.transform.Find("PopupHolder/TrialProPopup/DescriptionText").GetComponent <Text>().text = LanguageScript.ProContentText.Replace("%@", itemPrices[7]); } } else { GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/ProButton/PriceText").GetComponent <Text>().SetText(itemPrices[6] + " / " + LanguageScript.WeeklyText); GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/DescriptionText").GetComponent <Text>().SetText(LanguageScript.ProContentText.Replace("%@", itemPrices[6])); GameObject gameObject2 = GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/DescriptionText").gameObject; gameObject2.GetComponent <Text>().SetText(LanguageScript.ProContentText.Replace("%@", itemPrices[6])); if (PlayerPrefsManager.GetPro()) { GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/ProButton/PriceText").GetComponent <Text>().SetText(LanguageScript.AlreadyPurchasedText); GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/ProButton/PriceText").GetComponent <Text>().color = Color.white; GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/ProButton").GetComponent <Button>().interactable = false; GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/DescriptionText").GetComponent <Text>().SetText(LanguageScript.ProContentText.Replace("%@", itemPrices[6])); LanguageScript.ProContentText.Replace("%@", itemPrices[6]); } GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/BG/HintText").GetComponent <Text>().SetText(LanguageScript.ProFreeHintText); GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/BG/NoAdText").GetComponent <Text>().SetText(LanguageScript.ProNoAdText); GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/BG/GiftText").GetComponent <Text>().SetText(LanguageScript.ProDoubleDailyText); GameObject.Find("Canvas").transform.Find("Enviroment/ShopHolder/ProPopup/Terms&Conditions").GetComponent <Text>().SetText(LanguageScript.PrivacyPolicyText); } }