Exemplo n.º 1
0
    IEnumerator IRetrive(AudioSource source, float t)
    {
        yield return(new WaitForSeconds(t));

        source.Stop();
        _audioSouces.Retrive(source);
    }
Exemplo n.º 2
0
    public void Init(int count)
    {
        GameObject gb = new GameObject("SFX");

        gb.transform.parent = transform;
        var s = gb.AddComponent <AudioSource>();

        _audioSouces = new ComponentPool <AudioSource>(count, gb, transform);
        _audioSouces.Retrive(s);
    }