void ProxyInitialize() { ByteDataTunnel tunnel = this.GetComponent <ByteDataTunnel>(); NSpeexAudioProcessor nSpeexProcessor = this.GetComponent <NSpeexAudioProcessor>(); AudioDataReconstructor audioReconstructor = this.GetComponent <AudioDataReconstructor>(); tunnel.DataReceived += nSpeexProcessor.DecodeData; audioReconstructor.DataSource = nSpeexProcessor; }
public void ServerInitialize(NetworkPlayer owner) { this.owner = owner; AudioDataReconstructor audioReconstructor = this.GetComponent <AudioDataReconstructor>(); audioReconstructor.DataSource = null; ByteDataTunnel tunnel = this.GetComponent <ByteDataTunnel>(); List <NetworkPlayer> targets = new List <NetworkPlayer>(Network.connections.Length - 1); foreach (NetworkPlayer player in Network.connections) { if (player != this.owner) { targets.Add(player); } } tunnel.RemoteTargets = targets; tunnel.DataReceived += tunnel.SendDataToRemote; }