Beispiel #1
0
 public override void Init(LT_RESULT_NOTIFICATION_DELEGATE fnResult)
 {
     if (fnResult != null)
     {
         fnResult(_IsInited);
     }
 }
Beispiel #2
0
    public override void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback)
    {
        if (_IsLogined)
        {
            KakaoUtil.Unregister((resultCode) =>
            {
                bool isSuccessful = resultCode == KGResultCode.Success;
                if (isSuccessful)
                {
                    LogResult(_KakaoPrefix, "Unregister Succeeded", resultCode.ToString());
                    _IsLogined = KakaoUtil.IsLogined; // ͬ²½µÇ¼״̬£¨×¢Ïú³É¹¦£¬µÇ¼״̬Ϊfalse£©
                    if (!_IsLogined)
                    {
                        SingularSDK.UnsetCustomUserId();
                    }
                }
                else
                {
                    LogResult(_KakaoPrefix, "Unregister Failed", resultCode.ToString());
                }

                if (callback != null)
                {
                    callback(isSuccessful);
                }
            });
        }
    }
Beispiel #3
0
    public override void AccountConversion(LT_RESULT_NOTIFICATION_DELEGATE callback)
    {
        if (_IsLogined)
        {
            var idpProfile = KGLocalPlayer.currentPlayer.idpProfile;
            if (idpProfile.idpCode.Equals(KGIdpCodeString.Guest))
            {
                //KakaoUtil.AccountConversionWithCustomUI(KGIdpCode.Kakao, (resultCode) =>
                KakaoUtil.AccountConversion((resultCode) =>
                {
                    bool isSuccessful = resultCode == KGResultCode.Success;
                    if (isSuccessful)
                    {
                        LogResult(_KakaoPrefix, "AccountConversion Succeeded", resultCode.ToString());

                        _IsLogined = KakaoUtil.IsLogined; // ͬ²½µÇ¼״̬£¨Çл»³É¹¦£¬µÇ¼״̬Ϊfalse£©
                    }
                    else
                    {
                        LogResult(_KakaoPrefix, "AccountConversion Failed", resultCode.ToString());
                    }

                    if (callback != null)
                    {
                        callback(isSuccessful);
                    }
                });
            }
            else
            {
                HobaDebuger.LogErrorFormat("{0}AccountConversion failed, not logined as guest.", _KakaoPrefix);
            }
        }
    }
Beispiel #4
0
 public override void ShowCoupon(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
     KakaoUtil.ShowCoupon((isSuccess) =>
     {
         if (callback != null)
         {
             callback(isSuccess);
         }
     });
 }
Beispiel #5
0
    public override void EnablePush(bool enable, int type, LT_RESULT_NOTIFICATION_DELEGATE callback)
    {
        var option = (KGPushOption)type;

        KakaoUtil.EnablePush(option, enable, (isSuccess) =>
        {
            if (callback != null)
            {
                callback(isSuccess);
            }
        });
    }
Beispiel #6
0
 public override void GoogleGameLogout(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
     if (IsGoogleGameLogined)
     {
         KakaoUtil.GoogleLogout((resutlCode) =>
         {
             LogResult(_KakaoPrefix, "GoogleLogout", resutlCode.ToString());
             if (callback != null)
             {
                 callback(resutlCode == KGResultCode.Success);
             }
         });
     }
 }
Beispiel #7
0
        public static void EnablePush(bool enable, int type, LuaFunction callback = null)
        {
            LT_RESULT_NOTIFICATION_DELEGATE fnResult = null;

            if (callback != null)
            {
                fnResult = (isSuccessful) =>
                {
                    callback.Call(isSuccessful);
                    callback.Release();
                };
            }
            LT_Instance.EnablePush(enable, type, fnResult);
        }
Beispiel #8
0
        public static void Init(LuaFunction callback = null)
        {
            LT_RESULT_NOTIFICATION_DELEGATE fnResult = null;

            if (callback != null)
            {
                fnResult = (isSuccessful) =>
                {
                    callback.Call(isSuccessful);
                    callback.Release();
                };
            }
            LT_Instance.Init(fnResult);
        }
Beispiel #9
0
 public override void GoogleGameLogin(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
     if (_IsLogined)
     {
         var idpProfile = KGLocalPlayer.currentPlayer.idpProfile;
         if (idpProfile.idpCode.Equals(KGIdpCodeString.Kakao))
         {
             //Kakao IDP
             KakaoUtil.GoogleLogin((resutlCode) =>
             {
                 LogResult(_KakaoPrefix, "GoogleLogin", resutlCode.ToString());
                 if (callback != null)
                 {
                     callback(resutlCode == KGResultCode.Success);
                 }
             });
         }
     }
 }
Beispiel #10
0
 public virtual void AccountConversion(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }
Beispiel #11
0
 public virtual void GoogleGameLogout(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }
Beispiel #12
0
 //展示优惠券
 public virtual void ShowCoupon(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }
Beispiel #13
0
 public virtual void EnablePush(bool enable, int type, LT_RESULT_NOTIFICATION_DELEGATE callback = null)
 {
 }
Beispiel #14
0
 public abstract void Init(LT_RESULT_NOTIFICATION_DELEGATE fnResult);
Beispiel #15
0
 public abstract void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback);
Beispiel #16
0
 public override void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }