| | |
| | | public class DebugLogin : MonoBehaviour
|
| | | {
|
| | | public InputField appid;
|
| | | public InputField serverId;
|
| | | public InputField account;
|
| | | public InputField password;
|
| | |
|
| | |
| | | get { return LocalSave.GetString("DebugLogin_AppId"); }
|
| | | set { LocalSave.SetString("DebugLogin_AppId", value); }
|
| | | }
|
| | |
|
| | | string serverIdRecorder
|
| | | {
|
| | | get { return LocalSave.GetString("DebugLogin_ServerId"); }
|
| | | set { LocalSave.SetString("DebugLogin_ServerId", value); }
|
| | | }
|
| | |
|
| | |
|
| | | string accountRecorder
|
| | | {
|
| | |
| | | private void OnEnable()
|
| | | {
|
| | | appid.text = appidRecorder;
|
| | | serverId.text = serverIdRecorder;
|
| | | account.text = accountRecorder;
|
| | | password.text = passwordRecorder;
|
| | | isToken.isOn = istokenRecorder;
|
| | |
| | | public void Login()
|
| | | {
|
| | | appidRecorder = appid.text;
|
| | | serverIdRecorder = serverId.text;
|
| | | accountRecorder = account.text;
|
| | | passwordRecorder = password.text;
|
| | | istokenRecorder = isToken.isOn;
|
| | |
| | | var ip = ServerListCenter.Instance.currentServer.region_domain;
|
| | | var port = ServerListCenter.Instance.currentServer.login_port;
|
| | | var gamePort = ServerListCenter.Instance.currentServer.game_port;
|
| | | if (string.IsNullOrEmpty(serverId.text))
|
| | | {
|
| | | var serverData = ServerListCenter.Instance.currentServer;
|
| | | serverData.region_flag = int.Parse(serverId.text);
|
| | | ServerListCenter.Instance.currentServer = serverData;
|
| | | }
|
| | |
|
| | | loginModel.AccountLogin(ip, port, gamePort);
|
| | | }
|
| | | else
|
| | |
| | | var ip = ServerListCenter.Instance.currentServer.region_domain;
|
| | | var port = ServerListCenter.Instance.currentServer.login_port;
|
| | | var gamePort = ServerListCenter.Instance.currentServer.game_port;
|
| | | if (string.IsNullOrEmpty(serverId.text))
|
| | | {
|
| | | var serverData = ServerListCenter.Instance.currentServer;
|
| | | serverData.region_flag = int.Parse(serverId.text);
|
| | | ServerListCenter.Instance.currentServer = serverData;
|
| | | }
|
| | |
|
| | | loginModel.AccountLogin(ip, port, gamePort);
|
| | | }
|
| | | else
|