public override void OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters, Client client)
{
base.OnOperationRequest(operationRequest, sendParameters, client);
BaseRoom room = new BaseRoom(client);
client.CurrentRoom = room;
client.server.log.Info("ROOMID"+client.CurrentRoom.roomId);
OperationResponse response = new OperationResponse(OperationCode.CreateRoom);
Dictionary<byte, object> data = new Dictionary<byte, object>();
data.Add(ParameterCode.RoomId, room.roomId);
response.Parameters = data;
client.SendOperationResponse(response, sendParameters);
}
客户端点击创建房间没问题 服务器端也输出了随机生成的房间号,
但是客户端没有收到响应,第二次点击创建房间就提示
public void DebugReturn(DebugLevel level, string message)
{
Debug.Log(level + ":" + message);
}