Esempio n. 1
0
    public Coroutine FadeOut( TPObjectSuper tObj, AudioSource Source, float time )
    {
        if ( Source == null ) return null;
        if ( tObj == null ) tObj = this;

        AudioMute am = new AudioMute();
        TPCode t = null;

        Coroutine cor = tObj.NewThread( Thread_FadeOut, ref t );

        am.TPObj = tObj;
        am.Source = Source;
        am.time = time;
        am.volume = new float[ 1 ] { Source.volume };

        t.DataObject = am;

        return cor;
    }
Esempio n. 2
0
    public Coroutine FadeOutAndPlay( int newIndex, bool bNewLoop, TPObjectSuper tObj, AudioSource Source, float time )
    {
        if ( Source == null ) return null;
        if ( tObj == null ) tObj = this;

        AudioMute am = new AudioMute();
        TPCode t = null;

        Coroutine cor = tObj.NewThread( Thread_FadeOut, ref t );

        am.TPObj = tObj;
        am.Source = Source;
        am.time = time;
        am.volume = new float[ 1 ] { Source.volume };
        am.NewClipIndex = newIndex;
        am.bNewLoop = bNewLoop;

        t.DataObject = am;

        return cor;
    }