Ejemplo n.º 1
0
    public void destroyContent()
    {
        pool.returnAllObjects();
        wallPool.returnAllObjects();
        keyBoardOverlay.returnAllObjects();
        foreach (Transform t  in contentParent)
        {
            Destroy(t.gameObject);
        }
        Box.ClearList();
        Key.ClearList();
        Door.ClearList();
        PressurePlate.ClearList();
        LevelMetaData toDestroy = GetComponent <LevelMetaData> ();

        if (toDestroy != null)
        {
            DestroyImmediate(toDestroy);
        }
    }