Ejemplo n.º 1
0
 private bool onDonationPosted(ScheduledEventServiceEvents.CFCDonationPosted evt)
 {
     currentCoinCount = evt.DonationResult.cfcTotal;
     if (OnCoinCountUpdated != null)
     {
         OnCoinCountUpdated(currentCoinCount);
     }
     return(false);
 }
 private bool onDonationPosted(ScheduledEventServiceEvents.CFCDonationPosted evt)
 {
     dispatcher.RemoveListener <ScheduledEventServiceEvents.CFCDonationPosted>(onDonationPosted);
     Service.Get <CPDataEntityCollection>().GetComponent <CoinsData>(Service.Get <CPDataEntityCollection>().LocalPlayerHandle).Coins = evt.DonationResult.remainingCoinBalance;
     if (evt.DonationResult.reward != null)
     {
         dispatcher.DispatchEvent(new UIDisablerEvents.DisableUIElementGroup("ThankYouButtons"));
         CoroutineRunner.Start(showRewardPopup(evt.DonationResult.reward.ToReward(), RewardScreenDelay), this, "ShowCFCPopup");
     }
     checkPlayerCoinCount();
     setState(CoinsForChangePopupState.Thanks);
     LoadingOverlay.SetActive(value: false);
     coinsForChangeStation.OnCoinsDonated();
     Service.Get <EventDispatcher>().DispatchEvent(new HeadStatusEvents.ShowHeadStatus(TemporaryHeadStatusType.CFCDonation));
     Service.Get <ICPSwrveService>().Action("game.cfc", "donate", lastDonationAmount.ToString());
     return(false);
 }