private IEnumerator AnimateSetScreen() { StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, bg)); yield return(new WaitForSeconds(0.3f)); SoundManager.instance.SlideIn(); StartCoroutine(FugoUtils.FadeText(1f, animationTime, title)); StartCoroutine(FugoUtils.FadeImage(1f, animationTime, levelsBG.GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(1f, animationTime, ribbon)); StartCoroutine(FugoUtils.Scaler(Vector3.one, animationTime, bigLevel)); float levelDelay = 0.1f; IEnumerator enumerator = levelHolder.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform go = (Transform)enumerator.Current; StartCoroutine(FugoUtils.Scaler(Vector3.one, levelDelay, go)); levelDelay += 0.05f; } } finally { IDisposable disposable; IDisposable disposable2 = disposable = (enumerator as IDisposable); if (disposable != null) { disposable2.Dispose(); } } ArrangeScrollPosition(); }
private IEnumerator CloseImagePreviewThread() { StartCoroutine(FugoUtils.FadeImage(0f, 0.3f, imagePanel.GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(0f, 0.3f, imageHolder.GetComponent <Image>())); StartCoroutine(FugoUtils.FadeText(0f, 0.3f, imagePanel.Find("PreviewCountryText").GetComponent <Text>())); yield return(new WaitForSeconds(0.3f)); imagePanel.gameObject.SetActive(value: false); }
public void OpenHiddenMenu() { SoundManager.instance.Click(); hiddenMenu.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); hiddenMenu.GetComponent <Animator>().enabled = true; hiddenMenu.GetComponent <Animator>().Play("PopupOpen"); }
public void OpenTrialProPopup() { trialProPopup.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.8f, 0.35f, fadePanel)); trialProPopup.GetComponent <Animator>().enabled = true; trialProPopup.GetComponent <Animator>().Play("PopupOpen"); SoundManager.instance.SlideIn(); }
private IEnumerator AnimateSetScreenExit() { isAnimating = true; StartCoroutine(FugoUtils.FadeText(0f, animationTime, title)); StartCoroutine(FugoUtils.FadeImage(0f, animationTime, levelsBG.GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(0f, animationTime, ribbon)); StartCoroutine(FugoUtils.Scaler(Vector3.zero, animationTime, bigLevel)); IEnumerator enumerator = levelHolder.GetEnumerator(); try { while (enumerator.MoveNext()) { Transform go = (Transform)enumerator.Current; StartCoroutine(FugoUtils.Scaler(Vector3.zero, animationTime, go)); } } finally { IDisposable disposable; IDisposable disposable2 = disposable = (enumerator as IDisposable); if (disposable != null) { disposable2.Dispose(); } } yield return(new WaitForSeconds(animationTime)); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, bg)); GetComponent <SectionController>().OpeningAnimation(0.18f); yield return(new WaitForSeconds(0.2f)); IEnumerator enumerator2 = levelHolder.GetEnumerator(); try { while (enumerator2.MoveNext()) { Transform transform = (Transform)enumerator2.Current; UnityEngine.Object.Destroy(transform.gameObject); } } finally { IDisposable disposable; IDisposable disposable3 = disposable = (enumerator2 as IDisposable); if (disposable != null) { disposable3.Dispose(); } } panel.gameObject.SetActive(value: false); yield return(new WaitForSeconds(0.5f)); StopAllCoroutines(); isAnimating = false; }
public void OpenHiddenLevelPopup(Transform t) { hiddenLevelPopup.gameObject.SetActive(value: true); hiddenLevelPopup.Find("OKButton/Text").GetComponent <Text>().text = t.GetComponent <SetScript>().set.Price.ToString(); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); hiddenLevelPopup.GetComponent <Animator>().enabled = true; hiddenLevelPopup.GetComponent <Animator>().Play("PopupOpen"); SoundManager.instance.SlideIn(); }
public void OpenDailyGiftPopup() { GetComponent <DailyGiftSystem>().CreateDailyGifts(); dailyGiftPopup.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); dailyGiftPopup.GetComponent <Animator>().enabled = true; dailyGiftPopup.GetComponent <Animator>().Play("PopupOpen"); SoundManager.instance.SlideIn(); }
private IEnumerator OpenGalleryThread() { gallery.localScale = Vector3.zero; FugoUtils.ChangeAlpha(gallery.parent.parent.GetComponent <Image>(), 0f); galleryPanel.gameObject.SetActive(value: true); gallery.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, gallery)); StartCoroutine(FugoUtils.FadeImage(0.5f, 0.3f, galleryPanel.GetComponent <Image>())); yield return(null); }
private IEnumerator RewardedPopupThread() { yield return(new WaitForSeconds(0.3f)); rewardedPopup.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); rewardedPopup.GetComponent <Animator>().enabled = true; rewardedPopup.GetComponent <Animator>().Play("PopupOpen"); }
private IEnumerator OpenPopupThread() { popup.gameObject.SetActive(value: true); popup.transform.localScale = Vector3.one; popup.GetComponent <Animator>().enabled = true; popup.GetComponent <Animator>().Play("PopupOpen"); FugoUtils.ChangeAlpha(galleryPanel.GetComponent <Image>(), 0f); StartCoroutine(FugoUtils.FadeImage(0.5f, 0.3f, galleryPanel.GetComponent <Image>())); galleryPanel.gameObject.SetActive(value: true); yield return(null); }
private IEnumerator AnimCoinThread(Transform t, Transform destination) { StartCoroutine(CoinSoundThread()); StartCoroutine(FugoUtils.CurveMover(destination.position, 1f, t)); yield return(new WaitForSeconds(0.8f)); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, t.GetComponent <Image>())); yield return(new WaitForSeconds(1f)); UnityEngine.Object.Destroy(t.gameObject); }
private IEnumerator ProPopupThread() { ShopCloseButtonClicked(0.3f); yield return(new WaitForSeconds(0.4f)); proPopup.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); proPopup.GetComponent <Animator>().enabled = true; proPopup.GetComponent <Animator>().Play("PopupOpen"); SoundManager.instance.SlideIn(); }
private IEnumerator AnimCoinThread(Transform t) { yield return(new WaitForSeconds(UnityEngine.Random.Range(0f, 0.1f))); StartCoroutine(FugoUtils.CurveMover(shop.position, 1f, t)); yield return(new WaitForSeconds(0.8f)); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, t.GetComponent <Image>())); yield return(new WaitForSeconds(1f)); UnityEngine.Object.Destroy(t.gameObject); }
private IEnumerator GiftThread(Transform t) { StartCoroutine(FugoUtils.FadeImage(1f, 0.2f, rewardBG.GetComponent <Image>())); yield return(new WaitForSeconds(0.2f)); StartCoroutine(FugoUtils.Mover(Vector3.zero, 0.2f, t)); yield return(new WaitForSeconds(0.2f)); StartCoroutine(FugoUtils.Scaler(Vector3.one * 1.2f, 0.2f, t)); yield return(new WaitForSeconds(0.1f)); particles.SetActive(value: true); yield return(new WaitForSeconds(0.1f)); Vector3 topPos = t.Find("Top").transform.localPosition; topPos.y += 40f; StartCoroutine(FugoUtils.Mover(topPos, 0.2f, t.Find("Top"))); yield return(new WaitForSeconds(0.2f)); coin = CreateCoin(rewardBG, reward); SoundManager.instance.DailyReward(); Vector3 coinpos = coin.localPosition; coinpos.y += 100f; StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, coin.Find("Shine").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, coin.Find("Coin").GetComponent <Image>())); StartCoroutine(FugoUtils.Mover(coinpos, 0.3f, coin)); StartCoroutine(Rotator(coin.Find("Shine"))); yield return(new WaitForSeconds(0.3f)); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, t.Find("Top").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, t.Find("Bottom").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, congratzText)); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, rewardAmountText.GetComponent <Text>())); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, rewardHintText.GetComponent <Text>())); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, proBadge.transform.Find("Text").GetComponent <Text>())); StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, rewardAmountText.Find("CoinImage").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, proBadge.GetComponent <Image>())); StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, coin)); StartCoroutine(FugoUtils.Mover(Vector3.zero, 0.3f, coin)); yield return(new WaitForSeconds(0.3f)); StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, collectButton)); StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, rewardedButton)); yield return(new WaitForSeconds(0.3f)); collectButton.GetComponent <Animator>().enabled = true; rewardedButton.GetComponent <Animator>().enabled = true; yield return(new WaitForSeconds(3f)); particles.SetActive(value: false); }
private IEnumerator GiveGift() { rewardAmountText.GetComponent <Text>().text = "+" + prizeCoinAmounts[nextGift].ToString(); rewardAmountText.GetComponent <Text>().color = FugoUtils.HexToColor("FFFFFF00"); rewardAmountText.Find("CoinImage").GetComponent <Image>().color = FugoUtils.HexToColor("FFFFFF00"); congratzText.GetComponent <Text>().color = FugoUtils.HexToColor("FFFFFF00"); collectButton.transform.localScale = Vector3.zero; gift = UnityEngine.Object.Instantiate(DailyGiftSystem.instance.giftPrefab, giftPopup).transform; gift.localScale = Vector3.one; gift.Find("Top").GetComponent <Image>().sprite = DailyGiftSystem.instance.tops[boxes[nextGift]]; gift.Find("Bottom").GetComponent <Image>().sprite = DailyGiftSystem.instance.bottoms[boxes[nextGift]]; giftPopup.gameObject.SetActive(value: true); giftPopup.GetComponent <Animator>().enabled = true; giftPopup.GetComponent <Animator>().Play("PopupOpen"); yield return(new WaitForSeconds(0.5f)); particles.SetActive(value: true); yield return(new WaitForSeconds(0.1f)); Vector3 topPos = gift.Find("Top").transform.localPosition; topPos.y += 40f; StartCoroutine(FugoUtils.Mover(topPos, 0.2f, gift.Find("Top"))); yield return(new WaitForSeconds(0.2f)); coin = DailyGiftSystem.instance.CreateCoin(giftPopup, prizeCoinAmounts[nextGift]); coin.SetAsFirstSibling(); SoundManager.instance.DailyReward(); Vector3 coinpos = coin.localPosition; coinpos.y += 100f; StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, coin.Find("Shine").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, coin.Find("Coin").GetComponent <Image>())); StartCoroutine(FugoUtils.Mover(coinpos, 0.3f, coin)); StartCoroutine(Rotator(coin.Find("Shine"))); yield return(new WaitForSeconds(0.3f)); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, gift.Find("Top").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeImage(0f, 0.2f, gift.Find("Bottom").GetComponent <Image>())); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, congratzText)); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, rewardAmountText.GetComponent <Text>())); StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, rewardAmountText.Find("CoinImage").GetComponent <Image>())); StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, coin)); StartCoroutine(FugoUtils.Mover(Vector3.zero, 0.3f, coin)); yield return(new WaitForSeconds(0.3f)); collectButton.transform.localScale = Vector3.zero; StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, collectButton)); yield return(new WaitForSeconds(3f)); particles.SetActive(value: false); }
private IEnumerator LangPopupThread() { if (settingsPopup.gameObject.activeSelf) { SettingsCloseButtonClicked(0.3f); yield return(new WaitForSeconds(0.3f)); } languagePopup.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); languagePopup.GetComponent <Animator>().enabled = true; languagePopup.GetComponent <Animator>().Play("PopupOpen"); }
public void GalleryPicOnClick(Transform t) { UnityEngine.Debug.Log(t.name); SoundManager.instance.Click(); imageHolder.GetComponent <Image>().sprite = t.GetComponent <Image>().sprite; StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, imageHolder.GetComponent <Image>())); imagePanel.GetComponent <Image>().color = new Color(0f, 0f, 0f, 0f); imagePanel.Find("PreviewCountryText").GetComponent <Text>().color = new Color(1f, 1f, 1f, 0f); imagePanel.Find("PreviewCountryText").GetComponent <Text>().text = Games.sections[int.Parse(t.name)].Title; StartCoroutine(FugoUtils.FadeText(1f, 0.3f, imagePanel.Find("PreviewCountryText").GetComponent <Text>())); StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, imagePanel.GetComponent <Image>())); imagePanel.gameObject.SetActive(value: true); }
private IEnumerator CloseGalleryThread(float time) { if ((double)time > 0.01) { SoundManager.instance.Click(); } StartCoroutine(FugoUtils.Scaler(Vector3.zero, time, gallery)); StartCoroutine(FugoUtils.FadeImage(0f, time, galleryPanel.GetComponent <Image>())); yield return(new WaitForSeconds(time)); galleryPanel.gameObject.SetActive(value: false); gallery.gameObject.SetActive(value: false); }
private IEnumerator OpeningThread() { SetGallery(); SetProcessBars(); yield return(new WaitForSeconds(0.3f)); Image[] images = panel.GetComponentsInChildren <Image>(); Text[] texts = panel.GetComponentsInChildren <Text>(); if (PlayerPrefsManager.GetLang() != "Arabic" && PlayerPrefsManager.GetLang() != "Hebrew") { StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, shopButton)); } else { StartCoroutine(FugoUtils.Scaler(new Vector3(-1f, 1f, 1f), 0.3f, shopButton)); } StartCoroutine(FugoUtils.Scaler(Vector3.one, 0.3f, shopButton.Find("ShopButton"))); Image[] array = images; foreach (Image image in array) { if (!image.name.ToLower().Contains("button") && !image.name.ToLower().Contains("panel") && !(image.name.ToLower() == "imageholder")) { FugoUtils.ChangeAlpha(image, 0f); if (image.name == "ImageBW") { StartCoroutine(FugoUtils.FadeImage(0.5f, 0.3f, image)); } else if (image.name.ToLower() == "bgframe") { StartCoroutine(FugoUtils.FadeImage(0.1f, 0.3f, image)); } else { StartCoroutine(FugoUtils.FadeImage(1f, 0.3f, image)); } } } Text[] array2 = texts; foreach (Text text in array2) { FugoUtils.ChangeAlpha(text, 0f); StartCoroutine(FugoUtils.FadeText(1f, 0.3f, text)); } panel.gameObject.SetActive(value: true); if (PlayerPrefsManager.GetEarnedStar() > 0) { StartCoroutine(AnimateStarThread()); } }
public void SettingsButtonClicked() { if (!SectionController.isTutorial) { SoundManager.instance.Click(); settingsPopup.gameObject.SetActive(value: true); fadePanel.gameObject.SetActive(value: true); StartCoroutine(FugoUtils.FadeImage(0.6f, 0.35f, fadePanel)); settingsPopup.GetComponent <Animator>().enabled = true; settingsPopup.GetComponent <Animator>().Play("PopupOpen"); SoundManager.instance.SlideIn(); supportPopupAnimation.GetComponent <Animator>().Play("MenuHideAnimation2"); TextController.instance.FixSettingsTextSizes(); } }
public void FadeAllComponents(float aValue, float aTime, Transform go) { Text[] allComponents = go.GetAllComponents <Text>(); Image[] allComponents2 = go.GetAllComponents <Image>(); Text[] array = allComponents; foreach (Text go2 in array) { StartCoroutine(FugoUtils.FadeText(aValue, aTime, go2)); } Image[] array2 = allComponents2; foreach (Image go3 in array2) { StartCoroutine(FugoUtils.FadeImage(aValue, aTime, go3)); } }
public void BeforeGameFadeOut(LevelSet currentSet) { if (GameController.levelToOpen == -1) { animBG.GetComponent <Image>().sprite = Resources.Load <Sprite>("BGImages/" + currentSet.bgImage); if (animBG.GetComponent <Image>().sprite == null) { animBG.GetComponent <Image>().sprite = Resources.Load <Sprite>("BGImages/" + GameController.set.bgImage); } } else { animBG.GetComponent <Image>().sprite = Resources.Load <Sprite>("BGImages/" + currentSet.bgImage); } FugoUtils.ChangeAlpha(animBG.GetComponent <Image>(), 0f); StartCoroutine(FugoUtils.FadeImage(1f, 0.1f, animBG.GetComponent <Image>())); animBG.gameObject.SetActive(value: true); }
private IEnumerator SunShineEffect(float delay) { yield return(new WaitForSeconds(delay)); float time2 = UnityEngine.Random.Range(2f, 4f); float alpha2 = UnityEngine.Random.Range(0.7f, 1f); StartCoroutine(FugoUtils.FadeImage(alpha2, time2, shine)); float wait = UnityEngine.Random.Range(0f, 0.5f); yield return(new WaitForSeconds(time2 + wait)); time2 = UnityEngine.Random.Range(2f, 4f); alpha2 = UnityEngine.Random.Range(0.3f, 0.5f); StartCoroutine(FugoUtils.FadeImage(alpha2, time2, shine)); yield return(new WaitForSeconds(time2 + wait)); StartCoroutine(SunShineEffect(0f)); }
private IEnumerator PopupCloseThread(float time, Transform popup, bool fadePanelInteraction = true) { if (time > 0.01f) { SoundManager.instance.SlideOut(); } popup.GetComponent <Animator>().enabled = false; if (fadePanelInteraction) { StartCoroutine(FugoUtils.FadeImage(0f, time, fadePanel)); } StartCoroutine(FugoUtils.Scaler(Vector3.zero, time, popup)); yield return(new WaitForSeconds(time)); if (fadePanelInteraction) { fadePanel.gameObject.SetActive(value: false); } popup.gameObject.SetActive(value: false); }
private IEnumerator AfterGameFadeInThread(LevelSet currentSet) { FugoUtils.ChangeAlpha(animBG.GetComponent <Image>(), 1f); animBG.gameObject.SetActive(value: true); string bgPath = GameController.set.bgImage; if (GameController.levelToOpen == -1) { animBG.GetComponent <Image>().sprite = Resources.Load <Sprite>("BGImages/" + bgPath); if (animBG.GetComponent <Image>().sprite == null) { animBG.GetComponent <Image>().sprite = Resources.Load <Sprite>("BGImages/" + bgPath); } } else { animBG.GetComponent <Image>().sprite = Resources.Load <Sprite>("BGImages/" + bgPath); } StartCoroutine(FugoUtils.FadeImage(0f, 0.5f, animBG.GetComponent <Image>())); yield return(new WaitForSeconds(0.5f)); animBG.gameObject.SetActive(value: false); }
private IEnumerator ClosingThread() { Image[] images = panel.GetComponentsInChildren <Image>(); Text[] texts = panel.GetComponentsInChildren <Text>(); StartCoroutine(FugoUtils.Scaler(Vector3.zero, 0.3f, shopButton)); Image[] array = images; foreach (Image image in array) { if (!image.name.ToLower().Contains("button") && !image.name.ToLower().Contains("panel")) { StartCoroutine(FugoUtils.FadeImage(0f, 0.3f, image)); } } Text[] array2 = texts; foreach (Text go in array2) { StartCoroutine(FugoUtils.FadeText(0f, 0.3f, go)); } yield return(new WaitForSeconds(0.3f)); panel.gameObject.SetActive(value: false); MenuController.instance.AnimateMenu(); }