コード例 #1
0
 public SoundEffect(GameObject i_SFX, Transform i_SFXManager, AudioMixer i_mixerToSet)
 {
     Available        = true;
     m_SFX_GameObject = i_SFX;
     m_SFXManager     = i_SFXManager;
     m_SFX_GameObject.transform.parent = i_SFXManager;
     m_AudioGroup = m_SFX_GameObject.GetComponent <Turing.Audio.AudioGroup>();
     m_AudioGroup.SetMixer(i_mixerToSet);
 }
コード例 #2
0
 void OnEnable()
 {
     AGTarget                 = target as AudioGroup;
     serializedTarget         = new SerializedObject(AGTarget);
     channelsProp             = serializedTarget.FindProperty("channels");
     loopProp                 = serializedTarget.FindProperty("loop");
     playOnStartProp          = serializedTarget.FindProperty("playOnStart");
     spatialBlendProp         = serializedTarget.FindProperty("spatialBlend");
     maxDistanceProp          = serializedTarget.FindProperty("maxDistance");
     changeVolumeEachLoopProp = serializedTarget.FindProperty("changeVolumeEachLoop");
     uniformVolumeProp        = serializedTarget.FindProperty("uniformVolume");
     useRandomVolumeProp      = serializedTarget.FindProperty("useRandomVolume");
     randomVolumeRangeProp    = serializedTarget.FindProperty("randomVolumeRange");
     changePitchEachLoopProp  = serializedTarget.FindProperty("changePitchEachLoop");
     randomPitchProp          = serializedTarget.FindProperty("randomPitch");
     pitchProp                = serializedTarget.FindProperty("pitch");
     pitchRangeProp           = serializedTarget.FindProperty("pitchRange");
 }