public void ShowLoginPanel(bool bGuest, System.Action <LJAccount> _OnLoginCallBack = null) { ljAccountUser.Init(); OnLoginCallBack = _OnLoginCallBack; if (bGuest) { ljAccountUser.myloginType = 1; MSLDAccountManager.GuestLogin(LoginCallBack); } else { ljAccountUser.myloginType = 0; MSLDAccountManager.ShowLoginPannel(LoginCallBack); } }
public void LogOut(System.Action <string> _OnLogOutCallBack = null) { Logger.Log("LDAccountMgrSdk LogOut"); MSLDAccountManager.Logout((MSLDErrorCode code, string msg, MSLDAccount account) => { string flag = "0"; if (code == MSLDErrorCode.Success) { Logger.Log("登出成功!"); } else { Logger.Log("登出失败! code = " + code + " msg = " + msg); flag = "-1"; } if (_OnLogOutCallBack != null) { _OnLogOutCallBack(flag); } } ); }
public void SwitchAccount(System.Action <string> _OnLogOutCallBack, System.Action <LJAccount> _OnLoginCallBack) { Logger.Log("打开ShowUserCenterPannel"); OnLogOutCallBack = _OnLogOutCallBack; OnLoginCallBack = _OnLoginCallBack; MSLDAccountManager.ShowUserCenterPannel((MSLDErrorCode code, string msg, MSLDAccount data) => { if (code == MSLDErrorCode.Success) { Logger.Log("用户中心成功!"); } else if (code == MSLDErrorCode.UIUserClose) { Logger.Log("用户关闭用户中心! code = " + code + " msg = " + msg); } else { Logger.Log("调用用户中心失败! code = " + code + " msg = " + msg); } } ); }
public void AutoLogin(System.Action <LJAccount> _OnLoginCallBack = null) { ljAccountUser.myloginType = 2; OnLoginCallBack = _OnLoginCallBack; MSLDAccountManager.AutoLogin(autoLoginCallBack); }