public void OnRandomButtonClick() { GameRoot.PlayEffect(Consts.A_ButtonClick); var rdname = GameRoot.Instance.resourceService.GetRandomName(true); iptName.text = rdname; }
public void OnEnterGameClick() { GameRoot.PlayEffect(Consts.A_ButtonClick); if (iptName.text == "" || iptName.text == null) { GameRoot.AddTips("请输入合法名称"); } //发送请求; else { netService.SendMessages(new GameMessage() { cmd = (int)CMD.RenameRequest, renameRequest = new RenameRequest() { name = iptName.text } }); } }
public void OnEnterClick() { //GameRoot.Instance.audioService.PlayEffect(Consts.A_Login); GameRoot.PlayEffect(Consts.A_Login); //保存玩家输入 var account = m_AccountField.text; var password = m_PasswordField.text; //对输入进行判断 if (account != "" && password != "") { //保存 PlayerPrefs.SetString(Consts.SavingAccount, account); PlayerPrefs.SetString(Consts.SavingPassword, password); //发送网络请求 GameMessage message = new GameMessage { cmd = (int)CMD.LoginRequest, loginRequest = new LoginRequest() { Account = account, Password = password } }; netService.SendMessages(message); //切换场景 // LoginSystem.Instance.ReqLogin(); } else { GameRoot.AddTips("账号或密码为空"); } //进入游戏 }
public void OnNoticeClick() { GameRoot.PlayEffect(Consts.A_ButtonClick); }