Beispiel #1
0
 private void SendCreateRoomResponse(CreateRoomResponseEvent e)
 {
     if (e.Success)
     {
         SendCreateRoomSuccess(e.Message);
     }
     else
     {
         SendCreateRoomFail(e.ErrCode);
     }
 }
Beispiel #2
0
        private void OnCreateRoomResponse(CreateRoomResponseEvent e)
        {
            if (e.Success && _hasHallServer)
            {
                _hallRoomId = e.Message.HallRoomId;
                _roomId     = e.RoomId;

                var players = e.Message.Players;
                foreach (var player in players)
                {
                    if (player.Token != null)
                    {
                        _loginStates[player.Token] = new NetworkState(player.Id);
                    }
                    else
                    {
                        _logger.ErrorFormat("The token for player {0} on creating room is null", player.Id);
                    }
                }
            }
        }