Ejemplo n.º 1
0
    private IEnumerator FinishMoneyEffect()
    {
        yield return(new WaitForSeconds(0.1f));

        UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>();

        uIMainPage.OnMoneyEffect();//飘钱特效
    }
    private void HideUICallBack()
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
        {
            UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>();
            uIMainPage.OnMoneyEffect();//飘钱特效
        }));
    }
Ejemplo n.º 3
0
        private IEnumerator AfterTaskRewardReceived()
        {
            UIMainPage mainPage = PageMgr.GetPage <UIMainPage>();

            if (mainPage != null)
            {
                mainPage.OnMoneyEffect();
            }
            yield return(new UnityEngine.WaitForSeconds(0.2f));

            NextTask(missionModel.currTaskId);
        }
    public void SetNumberOfVideoViews(AdTagFM adTagFM)
    {
        switch (adTagFM)
        {
        case AdTagFM.Add_Double_Advert:
            if (playerLockGainDoubleAdsVideoCount < Config.globalConfig.getInstace().GoldRewardMaxNumber)
            {
                playerLockGainDoubleAdsVideoCount += 1;
                if (playerLockGainDoubleAdsVideoCount == Config.globalConfig.getInstace().GoldRewardMaxNumber)
                {
                    var rewardNumCoin = PlayerDataModule.AllScenePerMinCoin(true) * Config.globalConfig.getInstace().AdvertGoldReward;
                    //加钱
                    SetValueOfPlayerData.Send((int)GameMessageDefine.AddCoinOfPlayerDataMSSC, 0, rewardNumCoin, 0);
                    float timeCount = 0.1f;
                    DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
                    {
                        UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>();
                        uIMainPage.OnMoneyEffect();    //飘钱特效
                    }));
                }
            }

            break;

        case AdTagFM.Add_Tourist_Advert:
            playerLockVisitorNumberAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Ticket_Advert:
            playerLockEntryExpediteAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Visit_Advert:
            playerLockVisitorExpediteAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Offline_Advert:
            playerLockOfflineAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Viptiming_Advert:
            playerFreeItemAdsVideoCount += 1;
            break;

        default:
            break;
        }

        playerWatchAdsVideoCount += 1;



        if (adTagFM == AdTagFM.Add_Double_Advert)
        {
        }
        if (playerWatchAdsVideoCount == Config.globalConfig.getInstace().AdvertRewardNumber)
        {
            var rewardNum = Config.globalConfig.getInstace().AdvertRewardRmbNumber;
            //加钻石
            SetValueOfPlayerData.Send((int)GameMessageDefine.SetDiamondOfPlayerData, rewardNum, 0, 0);
            LogWarp.LogErrorFormat("看广告6次    增加了钻石");
            playerWatchAdsVideoCount = 0;
        }
    }