public override void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
        {
            this.screenData = (DRewardPopupScreenCoinsXP)screenData;
            popupController.RewardPopupAnimator.SetTrigger("ChestDismiss");
            CoinsText.text = string.Format(Service.Get <Localizer>().GetTokenTranslation("GlobalUI.Notification.Coins"), this.screenData.CoinCount);
            if (this.screenData.CoinCount == 0)
            {
                CoinsGO.SetActive(value: false);
            }
            if (this.screenData.XPCount == 0)
            {
                XPGO.SetActive(value: false);
            }
            else
            {
                CoroutineRunner.Start(loadMascotXPPrefab(this.screenData.mascotName), this, "RewardPopupScreenCoinsXP.loadMascotXPPrefab");
            }
            CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

            if (cPDataEntityCollection.TryGetComponent <MembershipData>(cPDataEntityCollection.LocalPlayerHandle, out var component))
            {
                component.MembershipDataUpdated += onMembershipDataUpdated;
            }
            Service.Get <TrayNotificationManager>().DismissAllNotifications();
            membershipNotificationText = Service.Get <Localizer>().GetTokenTranslation("MemberNotification.RewardScreen.LevelText");
            checkMembershipDisclaimer();
        }
 public override void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
 {
     this.screenData         = (DRewardPopupScreenCount)screenData;
     RewardCategoryText.text = RewardUtils.GetUnlockText(this.screenData.CountCategory);
     RewardCountText.text    = $"+ {this.screenData.Count}";
     popupController.RewardChest.ChestAnimator.SetTrigger("LaunchItems");
     isIntroComplete = false;
     tweenCountText();
 }
Beispiel #3
0
 public override void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
 {
     this.screenData         = (DRewardPopupScreenQuests)screenData;
     RewardCategoryText.text = Service.Get <Localizer>().GetTokenTranslation(TITLE_TEXT_KEY);
     isIntroComplete         = false;
     loadItems(this.screenData.quests);
     UnlockedText.SetActive(Service.Get <CPDataEntityCollection>().IsLocalPlayerMember() && !this.screenData.IsRewardsAllNonMember);
     Service.Get <TrayNotificationManager>().DismissAllNotifications();
     membershipNotificationText = Service.Get <Localizer>().GetTokenTranslation("MemberNotification.RewardScreen.QuestText");
     checkMembershipDisclaimer();
 }
Beispiel #4
0
        public override void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
        {
            controller              = popupController;
            this.screenData         = (DRewardPopupScreenItems)screenData;
            RewardCategoryText.text = RewardUtils.GetUnlockText(this.screenData.ItemCategory);
            popupController.RewardChest.ChestAnimator.SetTrigger("LaunchItems");
            isIntroComplete = false;
            loadItems(this.screenData.ItemCategory, this.screenData.Rewards);
            CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

            if (cPDataEntityCollection.TryGetComponent <MembershipData>(cPDataEntityCollection.LocalPlayerHandle, out var component))
            {
                component.MembershipDataUpdated += onMembershipDataUpdated;
            }
            checkMembershipDisclaimer();
            showMemberStatusIndicator();
            setBackground();
            UnlockedText.SetActive(Service.Get <CPDataEntityCollection>().IsLocalPlayerMember() && !this.screenData.IsRewardsAllNonMember);
        }
Beispiel #5
0
 public override void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
 {
     this.popupController = popupController;
     Service.Get <EventDispatcher>().DispatchEvent(default(LevelUpPopupShown));
 }
Beispiel #6
0
 public override void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
 {
     this.screenData      = (DRewardPopupScreenSplash)screenData;
     this.popupController = popupController;
     Service.Get <EventDispatcher>().DispatchEvent(default(RewardPopupSplashShown));
 }
 public virtual void Init(DRewardPopupScreen screenData, RewardPopupController popupController)
 {
 }