Пример #1
0
        public void RegisterAdWatch(AdPlacementType type, MetaDataStateBase playerState, Action getAdRewardForTypeMethod)
        {
            AdData      adData      = AdData.GetAdDataForPlacementType(type);
            AdStateItem adStateItem = GetStateItem(adData.PlacementType);

            if (adData != null && (adStateItem.UseCount < adData.DailyMaxUse || adData.DailyMaxUse == 0))
            {
                adStateItem.UseCount++;

                if (getAdRewardForTypeMethod != null)
                {
                    getAdRewardForTypeMethod.Invoke();
                }

                playerState.TotalAdWatchedCount++;
            }
        }
 public static void LoadData(MetaDataStateBase data)
 {
     current = data;
 }