Exemplo n.º 1
0
    internal void onSoundOver(SoundItem c, bool remove = true)
    {
        soundCount--;
        GameObject o = c.getSoundchanel().gameObject;

        if (o == playObject)
        {
            unUsedPool.Add(c.getSoundchanel());
        }
        else if (o.name == "SoundClip")
        {
            GameObject.DestroyObject(o);
        }
        else
        {
            GameObject.Destroy(c.getSoundchanel());
        }

        if (c.group != null)
        {
            c.group.onSoundOver(c);
        }

        if (remove)
        {
            allChannel.Remove(c);
        }
    }