public new void ShowPopUp(float aDelay = 0f) { coinsText.text = "+" + ELSingleton <XmlSettings> .Instance.rateItConfig.coins; coins.SetActive(!ELSingleton <RateUsManager> .Instance.consumed); coinsText.gameObject.SetActive(!ELSingleton <RateUsManager> .Instance.consumed); base.ShowPopUp(aDelay); exitButton.Enable(); }
public void ShowPopUp(string atitle, string amessage, float aDelay = 0f) { if (atitle != null) { title.text = atitle; } msg.text = amessage; ShowPopUp(aDelay); exitButton.Enable(); }
public new void ShowPopUp(float aDelay = 0f) { restoreButton.gameObject.SetActive(value: false); fbButtonText.text = (ELSingleton <FacebookManager> .Instance.connected ? "Disconnect" : "Connect"); base.ShowPopUp(aDelay); exitButton.Enable(); musicToggle.SetToggle(!ELSingleton <AudioManager> .Instance.musicMute, animate: false); sfxToggle.SetToggle(!ELSingleton <AudioManager> .Instance.sfxMute, animate: false); versionText.text = $"v{Application.version}"; }
public new void ShowPopUp(float aDelay = 0f) { base.ShowPopUp(aDelay); coinsText.text = $"{ELSingleton<ExtraWordsManager>.Instance.Coins.ToString()} COINS"; if (ELSingleton <ExtraWordsManager> .Instance.WordsMax > 0) { progressTop.rectTransform.sizeDelta = new Vector3(progressBottom.rectTransform.sizeDelta.x * (float)ELSingleton <ExtraWordsManager> .Instance.WordsCurrent / (float)ELSingleton <ExtraWordsManager> .Instance.WordsMax, progressTop.rectTransform.sizeDelta.y); } progressText.text = $"{ELSingleton<ExtraWordsManager>.Instance.WordsCurrent}/{ELSingleton<ExtraWordsManager>.Instance.WordsMax}"; exitButton.Enable(); collectButton.gameObject.SetActive(ELSingleton <ExtraWordsManager> .Instance.IsFull); }
public new void ShowPopUp(float aDelay = 0f) { base.ShowPopUp(aDelay); exitButton.Enable(); foreach (Transform item in content.transform) { item.gameObject.SetActive(value: false); UnityEngine.Object.Destroy(item.gameObject); } itemList = new List <RectTransform>(); loading.SetActive(value: true); ELSingleton <FacebookManager> .Instance.UpdateRanking(FacebookManager.FBRankingType.FRIENDS, this, "RankingCallback"); }
public new void ShowPopUp(float aDelay = 0f) { bool flag = ELSingleton <ShareManager> .Instance.HasCoinsReward(); coinsIcon.SetActive(flag); coinsText.gameObject.SetActive(flag); if (flag) { coinsText.text = "+" + ELSingleton <XmlSettings> .Instance.shareConfig.coins; } base.ShowPopUp(aDelay); exitButton.Enable(); }
public void ShowPopUp(string word, float aDelay = 0f) { ShowPopUp(aDelay); exitButton.Enable(); this.text.text = "Searching...\n\n\n"; lastWord = word; int num = 1; TextAsset textAsset = Resources.Load($"Dict/dict_{word.Substring(0, 1).ToUpper(CultureInfo.InvariantCulture)}") as TextAsset; if ((bool)textAsset) { string text = textAsset.text; string text2 = "<size=100>" + word + "</size>\n\n"; int startIndex = 0; string value = ""; while (true) { int num2 = text.IndexOf("|" + word + " ", startIndex, StringComparison.InvariantCultureIgnoreCase); if (num2 <= -1) { break; } num2 += word.Length; string text3 = textAsset.text.Substring(num2 + 2, 1); int num3 = text.IndexOf("|", num2 + 1, StringComparison.InvariantCultureIgnoreCase); if (num3 < 0) { num3 = text.Length; } startIndex = num3; string text4 = textAsset.text.Substring(num2 + 4, num3 - num2 - 5); if (!text3.Equals(value)) { text2 = text2 + "<size=80>" + GetTypeName(text3) + "</size>\n"; value = text3; } text2 = text2 + num + ". " + text4 + "\n\n"; num++; } if (text2.Length > 0) { this.text.text = text2 + "\n\n\n"; } else { this.text.text = "Ehh... :)\nWe can't find word definition.\n\n\n"; } Resources.UnloadUnusedAssets(); } StartCoroutine(SetScrollValue()); }
public new void ShowPopUp(float aDelay = 0f) { base.ShowPopUp(aDelay); exitButton.Enable(); pageIndex = 0; GameObject[] array = pages; for (int i = 0; i < array.Length; i++) { array[i].SetActive(value: false); } ELSingleton <AnalyticsManager> .Instance.TutorialStart("HowToPlayPopUp", new Dictionary <string, object> { { "screen", ELSingleton <MenuWindow> .Instance.isActiveAndEnabled ? "MenuWindow" : "GameWindow" } }); }
private void Update() { if (!ELSingleton <PopUpManager> .Instance.IsActiveAndEnabled() && UnityEngine.Input.GetKeyDown(KeyCode.Escape)) { BackButton(); } if (delay <= 0f) { switch (state) { case State.LoadNormal: case State.ReloadNormal: LoadLevel(LevelType.Normal); if (!isMusicPlaying) { ELSingleton <MusicManager> .Instance.PlayGameNormal(); isMusicPlaying = true; } background.Reset(LevelType.Normal, pack.index); if (state == State.LoadNormal) { if (IsHowToPlayPopUp) { IsHowToPlayPopUp = false; ELSingleton <HowToPlayPopUp> .Instance.ShowPopUp(0.5f); ELSingleton <ApplicationSettings> .Instance.Save(); SetState(State.Idle); } else { SetState(State.ShowLoadNormal); } } else { SetState(State.ShowReloadNormal); } ELSingleton <AnalyticsManager> .Instance.LevelStart((level.number + 1).ToString()); ELSingleton <NotificationsManager> .Instance.RegisterNotifications(pack.index, level.index); break; case State.ShowLoadNormal: board.Enable(2.5f); board.ShowFill(2f); board.ShowWords(2.1f); board.ShowIcon(2.2f); board.wordText.Show(2.3f); if (!isLevelCompleted && background.HasLadyBug()) { ladybug.Show(); } else { ladybug.Reset(); } levelText.Show(2.5f); categoryText.Show(0.2f); backButton.Enable(2.5f); backButton.Show(2.5f); shopButton.Enable(2.5f); shopButton.Show(2.5f); if (!level.isCompleted) { extraWordsButton.Enable(2.5f); extraWordsButton.Show(2.5f); perfectMeter.Show(2.5f); } hintBar.Set(level); if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.GoodStart, level.number)) { goodStartButton.Enable(2.5f); goodStartButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.StartAndFinish, level.number)) { startAndFinishButton.Enable(2.5f); startAndFinishButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.Expose, level.number)) { exposeButton.Enable(2.5f); exposeButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.Tip, level.number)) { tipButton.Enable(2.5f); tipButton.Show(2.5f); } SetState(State.Play, 2.5f); break; case State.ShowReloadNormal: board.Enable(2.5f); board.ShowFill(2f); board.ShowWords(2.1f); board.ShowIcon(2.2f); board.wordText.Show(2.3f); levelText.Show(2.5f); categoryText.Show(0.2f); backButton.Enable(); shopButton.Enable(2.5f); if (!level.isCompleted) { extraWordsButton.Enable(2.5f); perfectMeter.Show(2.5f); } hintBar.Set(level, 2.2f); if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.GoodStart, level.number)) { goodStartButton.Enable(2.5f); goodStartButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.StartAndFinish, level.number)) { startAndFinishButton.Enable(2.5f); startAndFinishButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.Expose, level.number)) { exposeButton.Enable(2.5f); exposeButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.Tip, level.number)) { tipButton.Enable(2.5f); tipButton.Show(2.5f); } SetState(State.Play, 2.5f); break; case State.LoadBonusRound: LoadLevel(LevelType.BonusRound); if (!isMusicPlaying) { ELSingleton <MusicManager> .Instance.PlayGameSpecial(); isMusicPlaying = true; } background.Reset(LevelType.BonusRound, -1); ladybug.Reset(); levelText.Hide(); categoryText.Hide(); extraWordsButton.Disable(); extraWordsButton.Hide(); extraWordsButton.FullParticleStop(); perfectMeter.Hide(); goodStartButton.Disable(); goodStartButton.Hide(); startAndFinishButton.Disable(); startAndFinishButton.Hide(); exposeButton.Disable(); exposeButton.Hide(); tipButton.Disable(); tipButton.Hide(); tipText.Hide(); specialWelcome.Show(LevelType.BonusRound, 0.5f); SetState(State.Idle); ELSingleton <AnalyticsManager> .Instance.LevelStart("bonus_round"); break; case State.ShowBonusRound: board.Enable(1f); board.ShowFill(0.5f); board.ShowWords(0.6f); board.ShowIcon(0.7f); board.wordText.Show(0.8f); levelText.Show(1f); backButton.Enable(1f); backButton.Show(1f); shopButton.Enable(1f); shopButton.Show(1f); timeMeter.Show(1f); SetState(State.Play, 1f); break; case State.LoadDailyPuzzle: LoadLevel(LevelType.DailyPuzzle); if (!isMusicPlaying) { ELSingleton <MusicManager> .Instance.PlayGameSpecial(); isMusicPlaying = true; } background.Reset(LevelType.DailyPuzzle, -2); ladybug.Reset(); specialWelcome.Show(LevelType.DailyPuzzle, 0.5f); SetState(State.Idle); ELSingleton <AnalyticsManager> .Instance.LevelStart("daily_puzzle"); break; case State.ShowDailyPuzzle: board.Enable(2.5f); board.ShowFill(2f); board.ShowWords(2.1f); board.ShowIcon(2.2f); board.wordText.Show(2.3f); levelText.Show(2.5f); categoryText.Show(0.2f); backButton.Enable(2.5f); backButton.Show(2.5f); shopButton.Enable(2.5f); shopButton.Show(2.5f); if (!level.isCompleted) { extraWordsButton.Enable(2.5f); extraWordsButton.Show(2.5f); perfectMeter.Show(2.5f); } hintBar.Set(level); if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.GoodStart, level.number)) { goodStartButton.Enable(2.5f); goodStartButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.StartAndFinish, level.number)) { startAndFinishButton.Enable(2.5f); startAndFinishButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.Expose, level.number)) { exposeButton.Enable(2.5f); exposeButton.Show(2.5f); } if (ELSingleton <HintManager> .Instance.IsHintAvailable(LevelHint.Tip, level.number)) { tipButton.Enable(2.5f); tipButton.Show(2.5f); } SetState(State.Play, 2.5f); break; case State.Play: if (categoryText.IsShowEnded && Time.timeScale > 1f) { Time.timeScale = 1f; } if (!ELSingleton <PopUpManager> .Instance.IsActiveAndEnabled()) { Tutorial tutorial = ELSingleton <TutorialManager> .Instance.CheckTrigger(level.type, level.number, level.stats.isPerfect&& level.stats.valid > 0, board.wordText.IsDictionary, board.Result == Board.WordCheckResult.ExtraWord); if (tutorial != null) { ELSingleton <TutorialWindow> .Instance.Show(tutorial, (tutorial.type == TutorialType.GoodStart)?(hintBar.transform.localPosition + goodStartButton.PositionTarget) : ((tutorial.type == TutorialType.StartAndFinish) ? (hintBar.transform.localPosition + startAndFinishButton.PositionTarget) : ((tutorial.type == TutorialType.Expose) ? (hintBar.transform.localPosition + exposeButton.PositionTarget) : ((tutorial.type == TutorialType.Tip) ? (hintBar.transform.localPosition + tipButton.PositionTarget) : ((tutorial.type == TutorialType.Perfect) ? perfectMeter.transform.localPosition : ((tutorial.type == TutorialType.Dictionary) ? (board.transform.localPosition + board.wordText.transform.localPosition * board.transform.localScale.x) : ((tutorial.type == TutorialType.Shop) ? shopButton.transform.localPosition : ((tutorial.type == TutorialType.ExtraWord) ? extraWordsButton.transform.localPosition : Vector3.zero)))))))); } } if (level.type == LevelType.Normal && board.IsComplete()) { board.Disable(); backButton.Disable(); shopButton.Disable(); extraWordsButton.Disable(); goodStartButton.Disable(); startAndFinishButton.Disable(); exposeButton.Disable(); tipButton.Disable(); tipText.Hide(); if (!isLevelCompleted) { if (isLastLevelInPack) { ELSingleton <CoinsManager> .Instance.AddCoins(ELSingleton <XmlSettings> .Instance.coinsConfig.pack); } isPerfect = level.stats.isPerfect; if (level.stats.isPerfect) { ELSingleton <CoinsManager> .Instance.AddCoins(ELSingleton <XmlSettings> .Instance.coinsConfig.perfect); } } LevelStats levelStats = new LevelStats(level.stats); ELSingleton <LevelSuccessPopUp> .Instance.ShowPopUp(level.type, level.stats, isLastLevelInPack, isLevelCompleted, levelStats, board.HasCoins()? 1.5f : 0.5f); ELSingleton <LevelsSettings> .Instance.levelSet.CompleteLevel(aIsCompleteLevel : true); ELSingleton <AnalyticsManager> .Instance.LevelComplete((level.number + 1).ToString(), new Dictionary <string, object> { { "extra_words", levelStats.pointsExtra } }); SetState(State.Idle); } else if (level.type == LevelType.BonusRound && timeMeter.TimeCurrent <= 0f) { board.Disable(); board.HideWords(); board.wordText.Hide(0.3f); board.HideFill(0.5f); board.HideIcon(0.5f); shopButton.Disable(); extraWordsButton.Disable(); goodStartButton.Disable(); startAndFinishButton.Disable(); exposeButton.Disable(); tipButton.Disable(); tipText.Hide(); LevelStats levelStats2 = new LevelStats(level.stats); ELSingleton <LevelSuccessPopUp> .Instance.ShowPopUp(level.type, level.stats, aIsLastLevelInPack : false, aIsLevelCompleted : false, levelStats2, 0.5f); ELSingleton <AnalyticsManager> .Instance.LevelComplete("bonus_round", new Dictionary <string, object> { { "extra_words", levelStats2.pointsExtra } }); SetState(State.Idle); } else if (level.type == LevelType.DailyPuzzle && board.IsComplete()) { board.Disable(); board.HideWords(); board.wordText.Hide(0.3f); board.HideFill(0.5f); board.HideIcon(0.5f); shopButton.Disable(); extraWordsButton.Disable(); goodStartButton.Disable(); startAndFinishButton.Disable(); exposeButton.Disable(); tipButton.Disable(); tipText.Hide(); LevelStats levelStats3 = new LevelStats(level.stats); ELSingleton <LevelSuccessPopUp> .Instance.ShowPopUp(level.type, level.stats, aIsLastLevelInPack : false, aIsLevelCompleted : false, levelStats3, 0.5f); ELSingleton <AnalyticsManager> .Instance.LevelComplete("daily_puzzle", new Dictionary <string, object> { { "extra_words", levelStats3.pointsExtra } }); SetState(State.Idle); } else if (board.IsWordValid) { if (level.type == LevelType.Normal || level.type == LevelType.DailyPuzzle) { switch (board.CheckWordNormal(level.isCompleted)) { case Board.WordCheckResult.Valid: StatsAddValid(); if (!isLevelCompleted) { StatsAddPointsNormal(1); ELSingleton <PointsManager> .Instance.AddPoints(1); } ELSingleton <AudioManager> .Instance.PlaySfx(soundWordValid); break; case Board.WordCheckResult.Invalid: if (board.wordText.Text.Length >= 3) { StatsSetPerfect(aIsPerfect: false); } ELSingleton <AudioManager> .Instance.PlaySfx(soundWordInvalid); break; case Board.WordCheckResult.Repeat: ELSingleton <AudioManager> .Instance.PlaySfx(soundWordRepeat); break; case Board.WordCheckResult.ExtraWord: if (!ELSingleton <ExtraWordsManager> .Instance.IsFull) { coinPod.ReleaseExtraWord(board.wordText.transform.position, extraWordsButton.coinTarget.transform.position, 2.5f); ELSingleton <ExtraWordsManager> .Instance.AddWords(1); } if (!isLevelCompleted) { StatsAddPointsExtra(1); ELSingleton <PointsManager> .Instance.AddPoints(1); } ELSingleton <AudioManager> .Instance.PlaySfx(soundWordExtra); break; } } else if (level.type == LevelType.BonusRound) { switch (board.CheckWordSpecial()) { case Board.WordCheckResult.Valid: StatsAddValid(); StatsAddPointsNormal(1); ELSingleton <PointsManager> .Instance.AddPoints(1); if (level.stats.valid % 4 == 0 && specialLevelRound > 0) { specialLevelRound--; board.SetSpecialLevelRound(specialLevelRound, aIsScaleForce: false); ELSingleton <AudioManager> .Instance.PlaySfx(soundSpecialLevelRound); } ELSingleton <AudioManager> .Instance.PlaySfx(soundWordValid); break; case Board.WordCheckResult.Invalid: ELSingleton <AudioManager> .Instance.PlaySfx(soundWordInvalid); break; } } board.IsWordValid = false; } if (level.type == LevelType.Normal || level.type == LevelType.DailyPuzzle) { perfectMeter.Setup(); } if (level.type == LevelType.BonusRound) { timeMeter.Setup(); } break; case State.ResetNormal: board.Reset(); perfectMeter.Reset(); if (isLastLevelInPack && !isLevelCompleted) { isMusicPlaying = false; SetState(State.LoadBonusRound); } else { SetState(State.ReloadNormal); } break; case State.HideBonusRound: board.wordText.Hide(0.3f); board.HideFill(0.5f); board.HideIcon(0.5f); categoryText.Hide(0.5f); backButton.Enable(); timeMeter.Hide(0.5f); SetState(State.ResetBonusRound, 1f); break; case State.ResetBonusRound: board.Reset(); specialWelcome.Reset(); SetState(State.LoadBonusRound); break; case State.HideDailyPuzzle: board.wordText.Hide(0.3f); board.HideFill(0.5f); board.HideIcon(0.5f); categoryText.Hide(0.5f); backButton.Enable(); extraWordsButton.Hide(0.5f); goodStartButton.Hide(0.5f); startAndFinishButton.Hide(0.5f); exposeButton.Hide(0.5f); tipButton.Hide(0.5f); tipText.Hide(); perfectMeter.Hide(0.5f); SetState(State.ResetDailyPuzzle, 1f); break; case State.ResetDailyPuzzle: board.Reset(); perfectMeter.Reset(); specialWelcome.Reset(); SetState(State.LoadDailyPuzzle); break; } } delay -= Time.deltaTime; }
public new void ShowPopUp(float aDelay = 0f) { base.ShowPopUp(aDelay); exitButton.Enable(); }
public new void ShowPopUp(float aDelay = 0f) { if (ELSingleton <IapManager> .Instance.IsInitialized()) { base.ShowPopUp(aDelay); exitButton.Enable(); foreach (Transform item in content.transform) { item.gameObject.SetActive(value: false); UnityEngine.Object.Destroy(item.gameObject); } itemList = new List <RectTransform>(); int num = 0; IapTitle iapTitle = Object.Instantiate(iapTitlePrefab, content.transform); iapTitle.Title = "Free Coins!"; itemList.Add(iapTitle.GetComponent <RectTransform>()); IapRevardedVideo iapRevardedVideo = Object.Instantiate(this.iapRevardedVideo, content.transform); iapRevardedVideo.Prepare(); itemList.Add(iapRevardedVideo.GetComponent <RectTransform>()); if (!ELSingleton <IapManager> .Instance.initialOfferConsummed) { foreach (XmlSettings.IapConfig item2 in ELSingleton <XmlSettings> .Instance.iapConfig) { if (item2.set == 1) { if (item2.type == ProductType.Consumable && item2.coins > 0 && (item2.expose > 0 || item2.goodStart > 0 || item2.startFinish > 0 || item2.tip > 0)) { IapTitle iapTitle2 = Object.Instantiate(iapTitlePrefab, content.transform); iapTitle2.Title = "One Time Offer!"; itemList.Add(iapTitle2.GetComponent <RectTransform>()); IapItem iapItem = Object.Instantiate(iapPrefabPacks, content.transform); iapItem.Prepare(item2); itemList.Add(iapItem.GetComponent <RectTransform>()); } num++; } } } bool flag = false; bool flag2 = false; bool flag3 = false; foreach (XmlSettings.IapConfig item3 in ELSingleton <XmlSettings> .Instance.iapConfig) { if (item3.set == 0) { if (item3.type == ProductType.Consumable && item3.coins > 0 && item3.expose == 0 && item3.goodStart == 0 && item3.startFinish == 0 && item3.tip == 0) { if (!flag) { IapTitle iapTitle3 = Object.Instantiate(iapTitlePrefab, content.transform); iapTitle3.Title = "Coins"; itemList.Add(iapTitle3.GetComponent <RectTransform>()); flag = true; } IapItem iapItem2 = Object.Instantiate(iapPrefabCoins, content.transform); iapItem2.Prepare(item3); itemList.Add(iapItem2.GetComponent <RectTransform>()); } if (item3.type == ProductType.Consumable && item3.coins == 0 && (item3.expose == 0 || item3.goodStart == 0 || item3.startFinish == 0 || item3.tip == 0)) { if (!flag2) { IapTitle iapTitle4 = Object.Instantiate(iapTitlePrefab, content.transform); iapTitle4.Title = "Hints"; itemList.Add(iapTitle4.GetComponent <RectTransform>()); flag2 = true; } IapItemHints iapItemHints = Object.Instantiate(iapPrefabHints, content.transform); iapItemHints.Prepare(item3); itemList.Add(iapItemHints.GetComponent <RectTransform>()); } if (item3.type == ProductType.Consumable && item3.coins > 0 && (item3.expose > 0 || item3.goodStart > 0 || item3.startFinish > 0 || item3.tip > 0)) { if (!flag3) { IapTitle iapTitle5 = Object.Instantiate(iapTitlePrefab, content.transform); iapTitle5.Title = "Packs"; itemList.Add(iapTitle5.GetComponent <RectTransform>()); flag3 = true; } IapItem iapItem3 = Object.Instantiate(iapPrefabPacks, content.transform); iapItem3.Prepare(item3); itemList.Add(iapItem3.GetComponent <RectTransform>()); } if (item3.type == ProductType.NonConsumable && item3.noads) { IapTitle iapTitle6 = Object.Instantiate(iapTitlePrefab, content.transform); iapTitle6.Title = "Remove Ads"; itemList.Add(iapTitle6.GetComponent <RectTransform>()); IapItem iapItem4 = Object.Instantiate(iapPrefabRemoveAds, content.transform); iapItem4.Prepare(item3); itemList.Add(iapItem4.GetComponent <RectTransform>()); } num++; } } float y = UpdateLayout(); RectTransform component = content.GetComponent <RectTransform>(); component.sizeDelta = new Vector2(component.sizeDelta.x, y); scrollRect.verticalNormalizedPosition = 1f; StartCoroutine(SetScrollValue()); float num2 = 0f; Component[] componentsInChildren = base.gameObject.GetComponentsInChildren <CommonButton>(); componentsInChildren = componentsInChildren; for (int i = 0; i < componentsInChildren.Length; i++) { ((CommonButton)componentsInChildren[i]).Show(num2); num2 += 0.1f; } } else { ELSingleton <MessagePopUp> .Instance.ShowPopUp("Shop", "Shop is not ready. Try again later."); } }
public void ShowPopUp(LevelType aLevelType, LevelStats aLevelStats, bool aIsLastLevelInPack, bool aIsLevelCompleted, LevelStats aStats, float aDelay = 0f) { ShowPopUp(aDelay); icon.GetComponent <Image>().sprite = ELSingleton <GameWindow> .Instance.board.icon.sprite; icon.GetComponent <Image>().SetNativeSize(); nextLevelButton.Enable(); bonusRoundButton.Enable(); continueButton.Enable(); replayButton.Enable(); switch (aLevelType) { case LevelType.Normal: { backgroundNormal.SetActive(value: true); backgroundSpecial.SetActive(value: false); ribbonNormal.SetActive(value: true); ribbonSpecial.SetActive(value: false); textNormal.SetActive(value: true); textBonusRound.SetActive(value: false); textDailyPuzzle.SetActive(value: false); collected.SetActive(value: true); Pack currentPack = ELSingleton <LevelsSettings> .Instance.levelSet.GetCurrentPack(); int levelsToCompleteCount = currentPack.GetLevelsToCompleteCount(); if (levelsToCompleteCount > 1) { levelsLeftText.gameObject.SetActive(value: true); levelsLeftText.text = $"{levelsToCompleteCount} levels left in {currentPack.name}"; } else if (levelsToCompleteCount > 0) { levelsLeftText.gameObject.SetActive(value: true); levelsLeftText.text = $"{levelsToCompleteCount} level left in {currentPack.name}"; } else { levelsLeftText.gameObject.SetActive(value: false); } if (!aIsLevelCompleted && aStats.isPerfect) { perfect.SetActive(value: true); } else { perfect.SetActive(value: false); } nextLevelButton.gameObject.SetActive(!aIsLastLevelInPack | aIsLevelCompleted); bonusRoundButton.gameObject.SetActive(aIsLastLevelInPack && !aIsLevelCompleted); continueButton.gameObject.SetActive(value: false); replayButton.gameObject.SetActive(value: false); nextButton.transform.localPosition = new Vector3(0f, nextButton.transform.localPosition.y, 0f); replayButton.transform.localPosition = new Vector3(160f, replayButton.transform.localPosition.y, 0f); extralWords.SetActive(value: true); break; } case LevelType.BonusRound: { backgroundNormal.SetActive(value: false); backgroundSpecial.SetActive(value: true); ribbonNormal.SetActive(value: false); ribbonSpecial.SetActive(value: true); textNormal.SetActive(value: false); textBonusRound.SetActive(value: true); textDailyPuzzle.SetActive(value: false); collected.SetActive(value: false); levelsLeftText.gameObject.SetActive(value: false); perfect.SetActive(value: false); bool flag2 = ELSingleton <AdsManager> .Instance.IsRewardedVideoAd && ELSingleton <GameWindow> .Instance.IsReplayAvailable; nextLevelButton.gameObject.SetActive(value: false); bonusRoundButton.gameObject.SetActive(value: false); continueButton.gameObject.SetActive(value: true); replayButton.gameObject.SetActive(flag2); nextButton.transform.localPosition = new Vector3(flag2 ? (-160f) : 0f, nextButton.transform.localPosition.y, 0f); replayButton.transform.localPosition = new Vector3(160f, replayButton.transform.localPosition.y, 0f); extralWords.SetActive(value: false); break; } case LevelType.DailyPuzzle: { backgroundNormal.SetActive(value: false); backgroundSpecial.SetActive(value: true); ribbonNormal.SetActive(value: false); ribbonSpecial.SetActive(value: true); textNormal.SetActive(value: false); textBonusRound.SetActive(value: false); textDailyPuzzle.SetActive(value: true); collected.SetActive(value: false); levelsLeftText.gameObject.SetActive(value: false); perfect.SetActive(value: false); bool flag = ELSingleton <AdsManager> .Instance.IsRewardedVideoAd && ELSingleton <GameWindow> .Instance.IsReplayAvailable; nextLevelButton.gameObject.SetActive(value: false); bonusRoundButton.gameObject.SetActive(value: false); continueButton.gameObject.SetActive(value: true); replayButton.gameObject.SetActive(flag); nextButton.transform.localPosition = new Vector3(flag ? (-160f) : 0f, nextButton.transform.localPosition.y, 0f); replayButton.transform.localPosition = new Vector3(160f, replayButton.transform.localPosition.y, 0f); extralWords.SetActive(value: true); break; } } isWordScoreUpdate = false; wordScoreDelay = 0f; wordScoreCurrent = ELSingleton <PointsManager> .Instance.Points - aLevelStats.pointsNormal - aLevelStats.pointsExtra; wordScoreTarget = wordScoreCurrent; levelWords = aLevelStats.pointsNormal; extraWords = aLevelStats.pointsExtra; popIndex = 0; isSkip = false; wordScoreAmount.text = wordScoreCurrent.ToString(); levelWordsAmount.text = aLevelStats.pointsNormal.ToString(); extraWordsAmount.text = aLevelStats.pointsExtra.ToString(); base.gameObject.GetComponent <Animator>().speed = 1f; }