private static void OnUserLogoutEvent(UserLogout2Client e, object[] args) { isLogin = false; isClickLogin = false; ResendMessageManager.startResend = false; loginMsg = null; SDKManager.LoginOut(PlayerLoginPlatform.ToString()); GameInfoCollecter.AddPlayerInfoValue("IsLogin", IsLogin); if (OnUserLogout != null) { OnUserLogout(e); } }
private static void OnUserLoginEvent(UserLogin2Client e, object[] args) { activationCode = ""; if (e.code == 0) { isLogin = true; GameDataMonitor.PushData("User", e.user, "玩家数据"); GameInfoCollecter.AddPlayerInfoValue("IsLogin", IsLogin); GameInfoCollecter.AddPlayerInfoValue("UserID", e.user.userID); GameInfoCollecter.AddPlayerInfoValue("LoginType", e.user.loginType); GameInfoCollecter.AddPlayerInfoValue("NickName", e.user.nickName); GameInfoCollecter.AddPlayerInfoValue("TypeKey", e.user.typeKey); GameInfoCollecter.AddPlayerInfoValue("PlayTime", e.user.playTime); GameInfoCollecter.AddPlayerInfoValue("TotalLoginDays", e.user.totalLoginDays); SDKManager.UserID = e.user.userID; } if (OnUserLogin != null) { OnUserLogin(e); } if (e.reloginState) { return; } isClickLogin = false; if (e.code != 0) { Debug.LogError("Login error code:" + e.code); return; } ResendMessageManager.startResend = true; loginMsg.typeKey = e.user.typeKey; SDKManager.LogLogin(e.user.userID); }