Пример #1
0
    public void Clean()
    {
        if (groundBlocks.Count > 0)
        {
            for (int i = groundBlocks.Count - 1; i >= 0; i--)
            {
                StageBlock item = groundBlocks[i];
                groundBlocks.Remove(item);
                item.DeleteItem();
            }
        }
        //objects
        if (StageObjects.Count > 0)
        {
            for (int i = StageObjects.Count - 1; i >= 0; i--)
            {
                StageObject item = StageObjects[i];
                StageObjects.Remove(item);
                item.DeleteItem();
            }
        }
        //for (int i = Decorations.Count - 1; i >= 0; i--)
        //{
        //    StageDecoration item = Decorations[i];
        //    Decorations.Remove(item);
        //    item.DeleteItem();
        //}

        PlayerSpawns.Clear();
        EnemySpawns.Clear();
    }