Exemplo n.º 1
0
        public override void OnDestroy()
        {
            base.OnDestroy();

            for (var i = InteractiveObjects.Count - 1; i >= 0; i--)
            {
                OnInteractiveObjectDestroyed(InteractiveObjects[i]);
            }

            InteractiveObjects.Clear();
            InteractiveObjects = null;
            InteractiveObjectsIndexedByLogicCollider.Clear();
            InteractiveObjectsIndexedByLogicCollider = null;
        }
Exemplo n.º 2
0
Arquivo: Map.cs Projeto: jaoel/LD44
    private void DestroyAllInteractiveObjects()
    {
        InteractiveObjects.ForEach(x =>
        {
            GameObject.Destroy(x);
        });
        InteractiveObjects.Clear();

        Enemies.ForEach(x =>
        {
            GameObject.Destroy(x);
        });
        Enemies.Clear();
    }