예제 #1
0
 private void OnJoinRoomListResponse(JoinRoomListResponseEvent e)
 {
     foreach (var info in e.JoinRoomResponseInfoList)
     {
         OnJoinRoom(info);
     }
 }
예제 #2
0
        private void SendJoinRoomListResponse(JoinRoomListResponseEvent e)
        {
            var msg = ResponseJoinRoomListMessage.Allocate();

            msg.HallRoomId = e.HallRoomId;
            msg.RetCode    = e.RetCode;
            foreach (var info in e.JoinRoomResponseInfoList)
            {
                var player = JoinPlayer.Allocate();
                player.RetCode = (int)info.ErrCode;
                player.Id      = info.PlayerId;
                player.Token   = info.Token;
                msg.Players.Add(player);
            }

            SendAndReleaseMessage(_serverChannel, RpcMessageType.ResponseJoinRoomList, msg);
        }