예제 #1
0
        public override UnityEngine.Component CreateComponent(GameObject gameObject)
        {
            AudioPanner audioPanner = gameObject.GetComponent <AudioPanner>();

            if (audioPanner == null)
            {
                audioPanner = gameObject.AddComponent <AudioPanner>();
            }
            return(audioPanner);
        }
예제 #2
0
 public override void UpdateParameters()
 {
     if (!_FrontLeftChannel.HasReachedTarget() && !_FrontRightChannel.HasReachedTarget() && !_CenterChannel.HasReachedTarget() && !_SideLeftChannel.HasReachedTarget() && !_SideRightChannel.HasReachedTarget() && !_RearLeftChannel.HasReachedTarget() && !_RearRightChannel.HasReachedTarget() && !_LFEChannel.HasReachedTarget())
     {
         return;
     }
     FabricTimer.Get();
     for (int i = 0; i < _dspInstances.Count; i++)
     {
         AudioPanner audioPanner = _dspInstances[i] as AudioPanner;
         if ((bool)audioPanner)
         {
             audioPanner._channelGains[0] = _FrontLeftChannel.GetValue();
             audioPanner._channelGains[1] = _FrontRightChannel.GetValue();
             audioPanner._channelGains[2] = _CenterChannel.GetValue();
             audioPanner._channelGains[3] = _LFEChannel.GetValue();
             audioPanner._channelGains[4] = _RearLeftChannel.GetValue();
             audioPanner._channelGains[5] = _RearRightChannel.GetValue();
             audioPanner._channelGains[6] = _SideLeftChannel.GetValue();
             audioPanner._channelGains[7] = _SideRightChannel.GetValue();
         }
     }
     base.UpdateParameters();
 }