Пример #1
0
    void clearDeath()
    {
        for (int i = 0; i < SCENE_OBJ.ALL.Count; i++)
        {
            SCENE_OBJ obj = SCENE_OBJ.ALL[i];
            if (obj.canDestroy)
            {
                obj.pool.delete(obj);
            }
        }
        for (int i = 0; i < AudioObj.globalAudio.Count; i++)
        {
            AudioObj obj = AudioObj.globalAudio[i];
            if (!obj.audioSrc.isPlaying)
            {
                obj.deleteFromScene();
            }
        }

        if (Explode.pool.live != null)
        {
            for (int i = 0; i < Explode.pool.live.Count; i++)
            {
                Explode obj = Explode.pool.live[i];
                if (!obj.src.isPlaying)
                {
                    obj.deleteFormScene();
                }
            }
        }
    }