public static void LoginReq(bool flag, string account, string name, int sex, string url, string password = "") { Login.LoginReq login = new Login.LoginReq(); login.version = GameConfig.programVersion; login.guest_mode = flag; login.account = account; login.password = password; login.name = name; login.url = url; login.sex = sex; login.client_os = GameConfig.OsName; MainRole.Instance.Url = url; MainRole.Instance.Name = name; MainRole.Instance.Sex = sex == 1?true:false; NetClient.Instance().WriteMsg("Login.LoginReq", login); }
public void onLoginClick() { if (accountInput.text == "") { ShowTip("please input account"); return; } if (passwdInput.text == "") { ShowTip("please input passwd"); return; } Login.LoginReq lo = new Login.LoginReq(); lo.account = accountInput.text; lo.token = passwdInput.text; network.WriteMsg("Login.LoginReq", lo); }