예제 #1
0
 public override void Init(LT_RESULT_NOTIFICATION_DELEGATE fnResult)
 {
     if (fnResult != null)
     {
         fnResult(_IsInited);
     }
 }
예제 #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);
                }
            });
        }
    }
예제 #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);
            }
        }
    }
예제 #4
0
 public override void ShowCoupon(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
     KakaoUtil.ShowCoupon((isSuccess) =>
     {
         if (callback != null)
         {
             callback(isSuccess);
         }
     });
 }
예제 #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);
            }
        });
    }
예제 #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);
             }
         });
     }
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
                 }
             });
         }
     }
 }
예제 #10
0
 public virtual void AccountConversion(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }
예제 #11
0
 public virtual void GoogleGameLogout(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }
예제 #12
0
 //展示优惠券
 public virtual void ShowCoupon(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }
예제 #13
0
 public virtual void EnablePush(bool enable, int type, LT_RESULT_NOTIFICATION_DELEGATE callback = null)
 {
 }
예제 #14
0
 public abstract void Init(LT_RESULT_NOTIFICATION_DELEGATE fnResult);
예제 #15
0
 public abstract void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback);
예제 #16
0
 public override void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback)
 {
 }