コード例 #1
0
        private void OnChannelOpenedOrClosed(string channel, ChannelProperties properties)
        {
            var channels = _playerChannels.Count + _roomChannels.Count;

            if (channels == 1)
            {
                Log.Debug("Local player started speaking");
                _localPlayerState.InvokeOnStartedSpeaking();
            }
            else if (channels == 0)
            {
                Log.Debug("Local player stopped speaking");
                _localPlayerState.InvokeOnStoppedSpeaking();
            }
        }
コード例 #2
0
 protected override RoomChannel CreateChannel(ushort subscriptionId, string channelId, ChannelProperties properties)
 {
     return(new RoomChannel(subscriptionId, channelId, this, properties));
 }
コード例 #3
0
 internal RoomChannel(ushort subscriptionId, string roomId, RoomChannels channels, ChannelProperties properties)
 {
     _subscriptionId = subscriptionId;
     _roomId         = roomId;
     _channels       = channels;
     _properties     = properties;
 }
コード例 #4
0
 internal PlayerChannel(ushort subscriptionId, string playerId, PlayerChannels channels, ChannelProperties properties)
 {
     _subscriptionId = subscriptionId;
     _playerId       = playerId;
     _channels       = channels;
     _properties     = properties;
 }
コード例 #5
0
 [NotNull] protected abstract T CreateChannel(ushort subscriptionId, TId channelId, ChannelProperties properties);