public override void Init(LT_RESULT_NOTIFICATION_DELEGATE fnResult) { if (fnResult != null) { fnResult(_IsInited); } }
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); } }); } }
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); } } }
public override void ShowCoupon(LT_RESULT_NOTIFICATION_DELEGATE callback) { KakaoUtil.ShowCoupon((isSuccess) => { if (callback != null) { callback(isSuccess); } }); }
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); } }); }
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); } }); } }
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); }
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); }
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); } }); } } }
public virtual void AccountConversion(LT_RESULT_NOTIFICATION_DELEGATE callback) { }
public virtual void GoogleGameLogout(LT_RESULT_NOTIFICATION_DELEGATE callback) { }
//展示优惠券 public virtual void ShowCoupon(LT_RESULT_NOTIFICATION_DELEGATE callback) { }
public virtual void EnablePush(bool enable, int type, LT_RESULT_NOTIFICATION_DELEGATE callback = null) { }
public abstract void Init(LT_RESULT_NOTIFICATION_DELEGATE fnResult);
public abstract void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback);
public override void Unregister(LT_RESULT_NOTIFICATION_DELEGATE callback) { }