Exemplo n.º 1
0
    public static void ShowRewardedVideoCallBack()
    {
        Srot.StartLimit();

        Debug.Log("ShowRewardedVideo");

        if (isDebug)
        {
            watchCompletedActionSelf?.Invoke();
            watchFailActionSelf?.Invoke();
            watchCompletedActionSelf = null;
            watchFailActionSelf      = null;
            watchEnterActionSelf     = null;
            entrySelf = 0;
            return;
        }

#if UNITY_EDITOR || SafeMode || NoAd
        watchCompletedActionSelf?.Invoke();
        watchFailActionSelf?.Invoke();
#elif UNITY_ANDROID && !UNITY_EDITOR
        CrossAndroid.ShowRewardedVideo(watchCompletedActionSelf, entrySelf);
#elif UNITY_IPHONE && !UNITY_EDITOR
        CrossIos.ShowRewardedVideo(entrySelf, watchCompletedActionSelf, Call, null, watchFailActionSelf);
#endif
        watchCompletedActionSelf = null;
        watchFailActionSelf      = null;
        entrySelf = 0;
    }
Exemplo n.º 2
0
    /// <summary>
    /// 取消等待loading视频广告
    /// </summary>
    public static void CancelShowRewardedVideo()
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        CrossAndroid.ReqHideLoadingRewardVideoWindow();
#elif UNITY_IPHONE && !UNITY_EDITOR
        CrossIos.ReqHideLoadingRewardVideoWindow();
#endif
    }
Exemplo n.º 3
0
    public static void CancelRewardVideo()
    {
#if UNITY_EDITOR || SafeMode || NoAd
#elif UNITY_ANDROID
        CrossAndroid.RewardVideoCancel();
#elif UNITY_IPHONE
        CrossIos.RewardVideoCancel();
#endif
    }
Exemplo n.º 4
0
    public static void LogEvetnForTrackLuckBalance(float i, int j = 200)
    {
#if SafeMode || Marketing
        Debuger.LogWarning("AF ====== LogEvetnForTrackLuckBalance" + "    Content === " + i + "   ===== " + j);
        return;
#elif UNITY_ANDROID && !UNITY_EDITOR
        CrossAndroid.LogEvetnForTrackLuckBalance(i, j);
#elif UNITY_IPHONE && !UNITY_EDITOR
        CrossIos.LogEvetnForTrackLuckBalance(i, j);
#endif
    }
Exemplo n.º 5
0
    public static void TraceEvent(string eventName, string jsonStr = "")
    {
        Debuger.LogWarning("AF ====== " + eventName + "    Content === " + jsonStr);

#if SafeMode || Marketing
        return;
#elif UNITY_ANDROID && !UNITY_EDITOR
        CrossAndroid.LogEvent(eventName, jsonStr);
#elif UNITY_IPHONE && !UNITY_EDITOR
        CrossIos.LogEvent(eventName, jsonStr);
#endif
    }
Exemplo n.º 6
0
    public static void VideoIsReady(IIsViedoReady isViedoReady, bool isCash)
    {
        Debug.Log("IIsViedoReady From ==== " + isViedoReady);

        if (isDebug)
        {
            isViedoReady?.isReady(true);
        }

#if UNITY_EDITOR || SafeMode || NoAd
        isViedoReady?.isReady(true);
#elif UNITY_ANDROID
        CrossAndroid.VideoIsReady(isViedoReady);
#elif UNITY_IPHONE
        CrossIos.VideoIsReady(isViedoReady, isCash);
#endif
    }
Exemplo n.º 7
0
    /// <summary>
    /// 播放插屏广告
    /// </summary>
    /// <param name="pos">0启动游戏,1切回游戏,2获取到奖励</param>
    /// <param name="must"></param>
    public static void ShowInterstitial(int pos = 2)
    {
        if (Srot.limit > 0)
        {
            return;
        }

        Debug.Log("ShowInterstitial");

        if (isDebug)
        {
            return;
        }

#if UNITY_EDITOR || NoAd || SafeMode
        return;
#elif UNITY_ANDROID && !UNITY_EDITOR
        CrossAndroid.ShowInterstitial();
#elif UNITY_IPHONE// && !UNITY_EDITOR
        CrossIos.ShowInterstitial(pos, null, null);
#endif
    }