예제 #1
0
    public void Destroy()
    {
        foreach (var row in LevelGrid)
        {
            foreach (var obj in row)
            {
                MonoBehaviour.Destroy(obj.gameObject);
            }
            row.Clear();
        }
        LevelGrid.Clear();

        foreach (var obj in LevelEnvironmentObjects)
        {
            MonoBehaviour.Destroy(obj.gameObject);
        }
        LevelEnvironmentObjects.Clear();

        foreach (var obj in LevelEnemies)
        {
            MonoBehaviour.Destroy(obj.gameObject);
        }
        LevelEnemies.Clear();

        LightSourceMap.Clear();

        LightSourceListenerMap.Clear();

        ObstructionMap.Clear();

        SpacePlayerOccupations.Clear();
    }