private void showNextReward()
    {
        ServerAddedReward serverAddedReward = rewardsToShow.Dequeue();

        ShowRewardPopup.Builder builder = new ShowRewardPopup.Builder(DRewardPopup.RewardPopupType.generic, serverAddedReward.reward).setRewardSource("ServerAddedReward");
        builder.setHeaderText("Rewards.ServerAdded.GiftTitle");
        ShowRewardPopup showRewardPopup = builder.Build();

        showRewardPopup.Execute();
    }
    private void showNextReward()
    {
        ClaimableRewardData claimableRewardData = rewardsToShow.Dequeue();

        ShowRewardPopup.Builder builder = new ShowRewardPopup.Builder(DRewardPopup.RewardPopupType.generic, claimableRewardData.Reward).setRewardSource("ClaimableReward");
        builder.setHeaderText(claimableRewardData.RewardTitle);
        ShowRewardPopup showRewardPopup = builder.Build();

        showRewardPopup.Execute();
        Service.Get <ICPSwrveService>().Action("game.marketing_promotion", claimableRewardData.RewardTitle);
    }
コード例 #3
0
 public void OnStateChanged(string state)
 {
     if (state == HandledState)
     {
         Service.Get <ICPSwrveService>().Action("free_member_weekend", "start");
         Service.Get <EventDispatcher>().AddListener <RewardEvents.RewardPopupComplete>(onRewardPopupComplete);
         ShowRewardPopup.Builder builder = new ShowRewardPopup.Builder(DRewardPopup.RewardPopupType.generic, null);
         builder.setHeaderText(TitleToken);
         builder.setCustomScreenKey(AllAccessRewardScreenKey);
         ShowRewardPopup showRewardPopup = builder.Build();
         showRewardPopup.Execute();
     }
 }
    private bool onClaimPreregistrationRewardFound(RewardServiceEvents.ClaimPreregistrationRewardFound evt)
    {
        Service.Get <EventDispatcher>().RemoveListener <RewardServiceEvents.ClaimPreregistrationRewardFound>(onClaimPreregistrationRewardFound);
        Service.Get <EventDispatcher>().RemoveListener <RewardServiceEvents.ClaimPreregistrationRewardNotFound>(onClaimPreregistrationRewardNotFound);
        Service.Get <ICPSwrveService>().Funnel(Service.Get <MembershipService>().AccountFunnelName, "07", "migration_rewards");
        Service.Get <EventDispatcher>().AddListener <RewardEvents.RewardPopupComplete>(onRewardPopupComplete);
        ShowRewardPopup.Builder builder = new ShowRewardPopup.Builder(DRewardPopup.RewardPopupType.generic, evt.Reward).setRewardSource("PreRegistrationReward");
        builder.setHeaderText("GlobalUI.RegistrationRewards.Title");
        ShowRewardPopup showRewardPopup = builder.Build();

        showRewardPopup.Execute();
        return(false);
    }