예제 #1
0
 public void WatchVideo()
 {
     Debug.LogError("Watch Video to get 200 coins");
     if (Application.platform == RuntimePlatform.Android)
     {
         AdsManager.Instance.ShowRewardedVideo((b) =>
         {
             if (b)
             {
                 DataUtils.AddCoinAndGame(200, 0);
                 MyAnalytics.LogFreeReward();
             }
         });
     }
     else
     {
         Debug.LogError("1111");
         DataUtils.AddCoinAndGame(200, 0);
     }
 }
예제 #2
0
    public void Click(int index)
    {
        if (btnvideo[index].color == Color.gray || !btnvideo[index].gameObject.activeSelf)
        {
            return;
        }

        SoundController.instance.PlaySound(soundGame.soundbtnclick);

#if UNITY_EDITOR
        Reward(index);
#else
        AdsManager.Instance.ShowRewardedVideo((b) =>
        {
            if (b)
            {
                Reward(index);
                MyAnalytics.LogFreeReward();
            }
        });
#endif
    }