Beispiel #1
0
        public void Collect()
        {
            if (IsReady)
            {
                bool isDoubleModeEnabled = false;
                switch ((GameGroups.GameGroupGameType)GameGroups.GameCtrl.instance.SelectGameNumber)
                {
                case GameGroups.GameGroupGameType.Cat:
                    isDoubleModeEnabled = config_cat.IsDoubleModeEnabled;
                    break;

                case GameGroups.GameGroupGameType.Gun:
                    isDoubleModeEnabled = config_gun.IsDoubleModeEnabled;
                    break;

                case GameGroups.GameGroupGameType.Orbit:
                    isDoubleModeEnabled = config_orbit.IsDoubleModeEnabled;
                    break;

                case GameGroups.GameGroupGameType.Slame:
                    isDoubleModeEnabled = config_slame.IsDoubleModeEnabled;
                    break;
                }
                if (isDoubleModeEnabled && gameplayStatistics.AddedGameplayCurrency > Amount)
                {
                    OnCollect.Dispatch(gameplayStatistics.AddedGameplayCurrency);
                }
                else
                {
                    OnCollect.Dispatch(Amount);
                }
                LastBonusGamesPlayed = lifetimeStatistics.GamesPlayed;
            }
        }
Beispiel #2
0
 public void CollectItem()
 {
     if (IsReadyToCollect())
     {
         var bonusData          = GetBonusData();
         var collectingStrategy = bonusData.CollectingStrategy;
         CachedCollectSeconds = 0;
         collectingStrategy.Collect(bonusData, economy);
         OnCollect.Dispatch(bonusData);
         Refresh();
     }
 }