public void addAI() { if (listUsers.Count < maxUser) { RequestConnectionRoom req = new RequestConnectionRoom(roomNo, "", (int)Common.USER_TYPE.COMPUTER); SocketManager.Instance().sendMessage(req); } else { } }
public void onClick(ResponseRoomList.Room item) { //Debug.Log("" + item.getIndex()); Debug.Log("index : " + item.title); if (item.password == null || item.password.Length == 0) { RequestConnectionRoom req = new RequestConnectionRoom(item.no, UserManager.Instance().nickName, (int)Common.USER_TYPE.USER); SocketManager.Instance().sendMessage(req); } else { // GameManager.Instance ().showAlert ("비밀번호를 입력해주세요.", true, (bool result, string fieldText) => { // if(result){ // RequestRoomPassword req = new RequestRoomPassword(item.no, fieldText); // SocketManager.Instance().sendMessage(req); // }else{ // } // }, true); showAlert("connectPasswd", "비밀번호를 입력해주세요.", true, true, (AlertData data, bool isOn, string fieldText) => { if (isOn) { //RequestRoomPassword req = new RequestRoomPassword(item.no, fieldText); //SocketManager.Instance().sendMessage(req); if (fieldText.Equals(item.password)) { RequestConnectionRoom req = new RequestConnectionRoom(item.no, UserManager.Instance().nickName, (int)Common.USER_TYPE.USER); SocketManager.Instance().sendMessage(req); } else { showAlert("failPasswd", "비밀번호가 다릅니다.", false, false, (AlertData data1, bool isOn1, string fieldText1) => { }); } } }); } }