public void Start([NotNull] string name, [NotNull] IAmplitudeProvider micAmplitude, [NotNull] Rooms rooms, [NotNull] RoomChannels roomChannels, [NotNull] PlayerChannels playerChannels, [NotNull] ILossEstimator loss) { if (name == null) { throw new ArgumentException("name"); } if (micAmplitude == null) { throw new ArgumentException("micProvider"); } if (rooms == null) { throw new ArgumentNullException("rooms"); } if (roomChannels == null) { throw new ArgumentException("roomChannels"); } if (playerChannels == null) { throw new ArgumentException("playerChannels"); } if (loss == null) { throw new ArgumentException("playerChannels"); } Local = new LocalVoicePlayerState(name, micAmplitude, rooms, roomChannels, playerChannels, loss); Add(Local); }
public LocalVoicePlayerState(string name, [NotNull] IAmplitudeProvider micAmplitude, [NotNull] Rooms rooms, [NotNull] RoomChannels roomChannels, [NotNull] PlayerChannels playerChannels, [NotNull] ILossEstimator loss, [NotNull] ICommsNetwork network) : base(name) { _rooms = rooms; _micAmplitude = micAmplitude; _roomChannels = roomChannels; _playerChannels = playerChannels; _loss = loss; _network = network; rooms.JoinedRoom += OnLocallyEnteredRoom; rooms.LeftRoom += OnLocallyExitedRoom; roomChannels.OpenedChannel += OnChannelOpened; roomChannels.ClosedChannel += OnChannelClosed; playerChannels.OpenedChannel += OnChannelOpened; playerChannels.ClosedChannel += OnChannelClosed; }
public LocalVoicePlayerState(string name, [NotNull] IAmplitudeProvider micAmplitude, [NotNull] Rooms rooms, [NotNull] RoomChannels roomChannels, [NotNull] PlayerChannels playerChannels) : base(name) { _rooms = rooms; _micAmplitude = micAmplitude; _roomChannels = roomChannels; _playerChannels = playerChannels; rooms.JoinedRoom += OnLocallyEnteredRoom; rooms.LeftRoom += OnLocallyExitedRoom; roomChannels.OpenedChannel += OnChannelOpened; roomChannels.ClosedChannel += OnChannelClosed; playerChannels.OpenedChannel += OnChannelOpened; playerChannels.ClosedChannel += OnChannelClosed; }