示例#1
0
        public static int showRewardAds(Action finishCallback = null, Action cancelCallback = null)
        {
            int             result   = 0;
            RuntimePlatform platform = Application.platform;

            if (platform != RuntimePlatform.IPhonePlayer)
            {
                if (platform == RuntimePlatform.Android)
                {
                    //Utils.CallAndroiSDKdFunc<int>("FacebookHelper", "showRewardVideoAds", out result, Array.Empty<object>());
                    Utils.ShowWinAds();
                }
                else
                {
                    Utils.ShowWinAds();
                }
            }
            else
            {
                result = 0;
            }
            JavaInvokeCShape.GetInstance().OnAdsComplateHandle = finishCallback;
            JavaInvokeCShape.GetInstance().OnAdsCancelHandle   = cancelCallback;
            return(result);
        }
示例#2
0
    private void Start()
    {
        Sequence _sequence = DOTween.Sequence();

        _sequence.AppendInterval(1f);
        _sequence.AppendCallback(delegate
        {
            this.m_count--;
            this.m_timer.text = this.m_count.ToString();
            if (this.m_count == 0)
            {
                DialogManager.GetInstance().Close(null);
                JavaInvokeCShape.GetInstance().OnAdsComplateCallback("win");
            }
        });
        _sequence.SetLoops(5);
        _sequence.SetTarget(this.m_timer);
    }
        public static int Share(Action finishCallback = null, Action cancelCallback = null)
        {
            int             result   = 0;
            RuntimePlatform platform = Application.platform;

            if (platform != RuntimePlatform.IPhonePlayer)
            {
                if (platform == RuntimePlatform.Android)
                {
                    Utils.CallAndroiSDKdFunc <int>("FacebookHelper", "share", out result, Array.Empty <object>());
                }
                else
                {
                    result = 0;
                }
            }
            else
            {
                result = 0;
            }
            JavaInvokeCShape.GetInstance().OnShareHandle = finishCallback;
            return(result);
        }
示例#4
0
 private void Awake()
 {
     JavaInvokeCShape.m_instance = this;
 }
示例#5
0
 public void OnClickClose()
 {
     DialogManager.GetInstance().Close(null);
     JavaInvokeCShape.GetInstance().OnAdsCancelCallback("win");
 }