예제 #1
0
    private void SaveLayers(SongEditorMemento memento)
    {
        List <SongEditorLayer> layers = layerManager.GetLayers();

        foreach (SongEditorLayer layer in layers)
        {
            SongEditorLayer layerCopy = layer.CloneDeep();
            memento.Layers.Add(layerCopy);
        }
    }
예제 #2
0
    public SongEditorLayer CloneDeep()
    {
        SongEditorLayer clone = new SongEditorLayer(LayerKey);

        clone.Color     = Color;
        clone.IsEnabled = IsEnabled;
        foreach (Note note in notes)
        {
            Note noteCopy = note.Clone();
            clone.AddNote(noteCopy);
        }
        return(clone);
    }