Example #1
0
    /// Make some noise! Plays the Cue. 
    public override void Play()
    {
        if(Loop && IsPlaying)
        {
            instance.Stop(false);
        }

        if(Cue != null)
        {
            if(Cue.Spatialization == SECTR_AudioCue.Spatializations.Infinite3D)
            {
                instance = SECTR_AudioSystem.Play(Cue, SECTR_AudioSystem.Listener, Random.onUnitSphere, Loop);
            }
            else
            {
                instance = SECTR_AudioSystem.Play(Cue, transform, Vector3.zero, Loop);
            }
            if(instance)
            {
                instance.Volume = volume;
                instance.Pitch = pitch;
            }
        }
    }
Example #2
0
 void OnWaiting()
 {
     _Stop(false);
     instance = SECTR_AudioSystem.Play(WaitingCue, transform, Vector3.zero, true);
 }
Example #3
0
 void OnOpen()
 {
     _Stop(false);
     instance = SECTR_AudioSystem.Play(OpenLoopCue, transform, Vector3.zero, true);
 }
Example #4
0
 void OnOpening()
 {
     _Stop(false);
     instance = SECTR_AudioSystem.Play(OpeningCue, transform, Vector3.zero, false);
 }
Example #5
0
 void OnClose()
 {
     _Stop(false);
     instance = SECTR_AudioSystem.Play(ClosedLoopCue, transform, Vector3.zero, true);
 }