Stop() public méthode

public Stop ( ) : void
Résultat void
Exemple #1
0
    public void Stop(AudioChannel channel = AudioChannel.Action)
    {
        FMOD_StudioEventEmitter emitter = this.GetEmitter(channel);

        if (emitter != null)
        {
            emitter.Stop(STOP_MODE.ALLOWFADEOUT);
        }
    }
Exemple #2
0
    public static bool PlayEmitter(string estring)      //Called To Play A Sound From Designated Emitter
    {
        FMOD_StudioEventEmitter EmitterToPlay = (FMOD_StudioEventEmitter)emitterlist[estring];

        EmitterToPlay.Stop();         //Stop Sound
        EmitterToPlay.Play();         //Play Sound

        return(true);
    }
Exemple #3
0
    public override void Awake()
    {
        FMOD_StudioEventEmitter fMOD_StudioEventEmitter = (FMOD_StudioEventEmitter)this.GetComponent(typeof(FMOD_StudioEventEmitter));

        this.WindDice     = UnityEngine.Random.Range(0, 4);
        this.WindDiceStop = UnityEngine.Random.Range(0, 3);
        if (this.WindDice == 2 && !this.Playing)
        {
            this.Playing = true;
            fMOD_StudioEventEmitter.Play();
        }
        else if (this.WindDiceStop == 2 && this.Playing)
        {
            this.Playing = false;
            fMOD_StudioEventEmitter.Stop();
        }
    }
Exemple #4
0
 private void ShutdownFire()
 {
     foreach (GameObject gameObject in this.fires)
     {
         if (gameObject)
         {
             ParticleSystem component = gameObject.GetComponent <ParticleSystem>();
             if (component)
             {
                 component.Stop(true, ParticleSystemStopBehavior.StopEmitting);
             }
             FMOD_StudioEventEmitter component2 = gameObject.GetComponent <FMOD_StudioEventEmitter>();
             if (component2)
             {
                 component2.Stop();
             }
         }
     }
 }