Пример #1
0
 /// <summary>
 /// 增加游客
 /// </summary>
 private void LockAdsSucceed_Tourist()
 {
     EntityShip.GetoffVisitor(numberVisitor);   //轮船游客到来
     playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Tourist_Advert);
     monitorCell = Config.monitorConfig.getInstace().getCell(18);
     AdWatchComplete.Send(AdWatchComplete.AdType_RewardedVideo, AdTagFM.Add_Tourist_Advert.ToString());
 }
Пример #2
0
    private void OnGetIsLockAdsSucceedBool(bool isBool)
    {
#if TEST_NO_AD_SHOW
        isBool = true;
#endif
        Config.monitorCell cell;

        if (isBool == true)
        {
            switch (condition)
            {
            case "TouristButton":
                LogWarp.LogError("测试    进入观看广告时间  touristButton ");
                EntityShip.GetoffVisitor(numberVisitor);       //轮船游客到来
                playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Tourist_Advert);

                AdWatchComplete.Send(AdWatchComplete.AdType_RewardedVideo, AdTagFM.Add_Tourist_Advert.ToString());

                break;

            case "VisitButton":
                BroadcastNum.Send((int)GameMessageDefine.AddBuff, 10, 0, 0);        //动物栏观光时间
                playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Visit_Advert);

                MessageManager.GetInstance().Send((int)GameMessageDefine.ImmediateFinishVisitCD);
                break;

            case "TicketButton":
                BroadcastNum.Send((int)GameMessageDefine.AddBuff, 12, 0, 0);        //售票口时间
                playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Ticket_Advert);

                AdWatchComplete.Send(AdWatchComplete.AdType_RewardedVideo, AdTagFM.Add_Ticket_Advert.ToString());
                MessageManager.GetInstance().Send((int)GameMessageDefine.ImmediateFinishEntryGateCheckInCD);;
                break;

            case "FreeItemButton":
                SetValueOfPlayerData.Send((int)GameMessageDefine.AddCoinOfPlayerDataMSSC, 0, freeItemRwdCoinQuantity, 0);     //贵宾定时广告
                GameManager.GetInstance().StartCoroutine(FinishMoneyEffect());
                playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Viptiming_Advert);
                AdWatchComplete.Send(AdWatchComplete.AdType_RewardedVideo, AdTagFM.Add_Viptiming_Advert.ToString());

                break;

            default:
                break;
            }
            playerNumberOfVideosWatched = playerData.playerZoo.playerNumberOfVideosWatched;
            //利用dotweeen做延时操作 防止穿透
            float timeCount = 0.1f;
            DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
            {
                this.Hide();
            }));
        }
        else
        {
            LogWarp.LogError("测试: 视频播放  失败");
        }
    }
Пример #3
0
    /// <summary>
    /// 离线广告视频
    /// </summary>
    private void LockAdsSucceed_Offline()
    {
        offlineRewardCoin *= waitingADProfit;
        GlobalDataManager.GetInstance().playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Offline_Advert);
        var cell = Config.monitorConfig.getInstace().getCell(26);

        AdWatchComplete.Send(AdWatchComplete.AdType_RewardedVideo, AdTagFM.Add_Offline_Advert.ToString());
    }
Пример #4
0
    /// <summary>
    /// 增益翻倍广告
    /// </summary>
    private void LockAdsSucceed_Double()
    {
        PlayerNumberOfVideosWatched playerNumberOfVideosWatched = GlobalDataManager.GetInstance().playerData.playerZoo.playerNumberOfVideosWatched;

        if (playerNumberOfVideosWatched.playerLockGainDoubleAdsVideoCount < 6)
        {
            AdWatchComplete.Send(AdWatchComplete.AdType_RewardedVideo, AdTagFM.Add_Double_Advert.ToString());
            BroadcastNum.Send((int)GameMessageDefine.AddBuff, 14, 0, 0);
        }
        playerData.playerZoo.playerNumberOfVideosWatched.SetNumberOfVideoViews(AdTagFM.Add_Double_Advert);
    }
Пример #5
0
        private void OnAdWatchComplete(Message message)
        {
            AdWatchComplete awmessage = message as AdWatchComplete;

            CheckTasksProgressForAdWatchComplete(awmessage.adTag);
        }