void OnClick() { if (!this.IsOccupied) { JoinRoomRequestParameter request = new JoinRoomRequestParameter(); request.RoomNo = this.m_Room.RoomNo; request.Position = this.m_Position; CommunicationUtility.Instance.JoinRoom(request, this, "ReceivedJoinResponse"); } }
private void OnClick() { for (int i = 0; i < this.m_Positions.Length; i++) { if (!this.m_Positions[i].IsOccupied) { JoinRoomRequestParameter request = new JoinRoomRequestParameter(); request.RoomNo = this.m_RoomNo; request.Position = i; PlayerInformation.Instance.CurrentRoomNo = this.m_RoomNo; PlayerInformation.Instance.RoomPosition = i; CommunicationUtility.Instance.JoinRoom(request, this, "ReceivedJoinResponse"); break; } } }
public void JoinRoom(JoinRoomRequestParameter parameter, Component receiver, string methodName) { this.CommunicateWithServer(receiver, methodName, true, parameter.GetHashtableFromParameter(), ClientCommandConsts.JOIN_ROOM_REQUEST, ServerCommandConsts.JOIN_ROOM_RESPONSE); }