public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in containers)
     {
         param.collections.ForEach(x => x.DeleteObject(obj));
     }
 }
Exemple #2
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     containers[0].objectData = BeatmapObject.GenerateCopy(editedData);
     param.nodeEditor.ObjectWasSelected(containers[0]);
     param.nodeEditor.UpdateAppearance(containers[0]);
     param.tracksManager.RefreshTracks();
 }
    public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
    {
        switch (data.beatmapType)
        {
        case BeatmapObject.Type.NOTE:
            param.notes.DeleteObject(container);
            break;

        case BeatmapObject.Type.BOMB:
            param.notes.DeleteObject(container);
            break;

        case BeatmapObject.Type.CUSTOM_NOTE:
            param.notes.DeleteObject(container);
            break;

        case BeatmapObject.Type.OBSTACLE:
            param.obstacles.DeleteObject(container);
            break;

        case BeatmapObject.Type.EVENT:
            param.events.DeleteObject(container);
            break;

        case BeatmapObject.Type.CUSTOM_EVENT:
            param.events.DeleteObject(container);
            break;
        }
    }
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     selected = new List <BeatmapObjectContainer>(SelectionController.SelectedObjects);
     SelectionController.DeselectAll();
     SelectionController.SelectedObjects.AddRange(oldSelected);
     SelectionController.RefreshSelectionMaterial(false);
 }
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     oldSelected = new HashSet <BeatmapObjectContainer>(SelectionController.SelectedObjects);
     SelectionController.DeselectAll();
     SelectionController.SelectedObjects = new HashSet <BeatmapObjectContainer>(selected);
     SelectionController.RefreshSelectionMaterial(false);
 }
    public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
    {
        switch (container.objectData.beatmapType)
        {
        case BeatmapObject.Type.NOTE:
            (container as BeatmapNoteContainer).mapNoteData = new BeatmapNote(editedData);
            break;

        case BeatmapObject.Type.BOMB:
            (container as BeatmapNoteContainer).mapNoteData = new BeatmapNote(editedData);
            break;

        case BeatmapObject.Type.CUSTOM_NOTE:
            (container as BeatmapNoteContainer).mapNoteData = new BeatmapNote(editedData);
            break;

        case BeatmapObject.Type.OBSTACLE:
            (container as BeatmapObstacleContainer).obstacleData = new BeatmapObstacle(editedData);
            break;

        case BeatmapObject.Type.EVENT:
            (container as BeatmapEventContainer).eventData = new MapEvent(editedData);
            break;

        case BeatmapObject.Type.CUSTOM_EVENT:
            (container as BeatmapEventContainer).eventData = new MapEvent(editedData);
            break;
        }
        param.nodeEditor.ObjectWasSelected(container);
        param.nodeEditor.UpdateAppearance(container);
    }
    public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
    {
        BeatmapObject copy = BeatmapObject.GenerateCopy(data);

        switch (data.beatmapType)
        {
        case BeatmapObject.Type.NOTE:
            container = param.notes.SpawnObject(copy);
            break;

        case BeatmapObject.Type.BOMB:
            container = param.notes.SpawnObject(copy);
            break;

        case BeatmapObject.Type.CUSTOM_NOTE:
            container = param.notes.SpawnObject(copy);
            break;

        case BeatmapObject.Type.OBSTACLE:
            container = param.obstacles.SpawnObject(copy);
            break;

        case BeatmapObject.Type.EVENT:
            container = param.events.SpawnObject(copy);
            break;

        case BeatmapObject.Type.CUSTOM_EVENT:
            container = param.events.SpawnObject(copy);
            break;
        }
    }
Exemple #8
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject obj in Data)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType)?.SpawnObject(obj, refreshesPool: false);
     }
     RefreshPools(Data);
 }
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     param.events.DeleteObject(container);
     if (chromaEvent != null)
     {
         param.events.DeleteObject(chromaEvent);
     }
 }
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     container = param.events.SpawnObject(BeatmapObject.GenerateCopy(data));
     if (chromaEvent != null)
     {
         param.events.SpawnObject(BeatmapObject.GenerateCopy(chromaData));
     }
 }
Exemple #11
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in containers)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.objectData.beatmapType).DeleteObject(obj, false, Comment);
     }
     param.tracksManager.RefreshTracks();
 }
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in containers)
     {
         BeatmapObject copy = BeatmapObject.GenerateCopy(obj.objectData);
         param.collections.Where(x => x.ContainerType == copy.beatmapType).FirstOrDefault()?.SpawnObject(copy, out _);
     }
 }
Exemple #13
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject obj in Data)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType).DeleteObject(obj, false, false);
     }
     RefreshPools(Data);
 }
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     base.Undo(param);
     if (conflictingObject != null)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(conflictingObject.beatmapType).SpawnObject(conflictingObject, false, true);
     }
 }
Exemple #15
0
    public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
    {
        float beatTime = param.collections.First().AudioTimeSyncController.CurrentBeat;

        param.collections.First().AudioTimeSyncController.MoveToTimeInBeats(time);
        param.selection.Paste(false);
        param.collections.First().AudioTimeSyncController.MoveToTimeInBeats(beatTime);
    }
Exemple #16
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in pastedObjects)
     {
         param.collections.ForEach(x => x.DeleteObject(obj));
     }
     SelectionController.CopiedObjects = pastedData;
 }
Exemple #17
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in containers)
     {
         BeatmapObject copy = BeatmapObject.GenerateCopy(obj.objectData);
         BeatmapObjectContainerCollection.GetCollectionForType(copy.beatmapType)?.SpawnObject(copy, out _);
     }
     param.tracksManager.RefreshTracks();
 }
Exemple #18
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in pastedObjects)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.objectData.beatmapType).DeleteObject(obj, false);
     }
     SelectionController.CopiedObjects = pastedData;
     param.tracksManager.RefreshTracks();
 }
Exemple #19
0
    public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
    {
        AudioTimeSyncController atsc = BeatmapObjectContainerCollection.GetAnyCollection().AudioTimeSyncController;
        float beatTime = atsc.CurrentBeat;

        atsc.MoveToTimeInBeats(time);
        param.selection.Paste(false);
        atsc.MoveToTimeInBeats(beatTime);
        param.tracksManager.RefreshTracks();
    }
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject data in Data.ToArray())
     {
         BeatmapObjectContainerCollection.GetCollectionForType(data.beatmapType).SpawnObject(data, false, false);
         SelectionController.Select(data, true, false, false);
     }
     SelectionController.RefreshSelectionMaterial(false);
     RefreshPools(Data);
 }
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject data in deletedData)
     {
         BeatmapObject          copy      = BeatmapObject.GenerateCopy(data);
         BeatmapObjectContainer recovered = param.collections.Where(x => x.ContainerType == copy.beatmapType).FirstOrDefault()?.SpawnObject(copy, out _);
         SelectionController.Select(recovered, true, false);
     }
     SelectionController.RefreshSelectionMaterial(false);
 }
Exemple #22
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in generatedObjects)
     {
         param.events.DeleteObject(obj);
     }
     generatedObjects.Clear();
     SelectionController.SelectedObjects.Clear();
     SelectionController.RefreshSelectionMaterial(false);
 }
Exemple #23
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in pastedObjects)
     {
         param.bpm.DeleteObject(obj);
         param.notes.DeleteObject(obj);
         param.events.DeleteObject(obj);
         param.obstacles.DeleteObject(obj);
     }
     SelectionController.CopiedObjects = pastedData;
 }
Exemple #24
0
 public override void Undo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject data in deletedData)
     {
         BeatmapObject          copy      = BeatmapObject.GenerateCopy(data);
         BeatmapObjectContainer recovered = BeatmapObjectContainerCollection.GetCollectionForType(copy.beatmapType)?.SpawnObject(copy);
         SelectionController.Select(recovered, true, false);
     }
     SelectionController.RefreshSelectionMaterial(false);
     param.tracksManager.RefreshTracks();
 }
Exemple #25
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject obj in conflictingData)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType).DeleteObject(obj, false, false);
     }
     foreach (BeatmapObject obj in Data)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType).SpawnObject(obj, false, false);
     }
     BeatmapObjectContainerCollection.GetCollectionForType(BeatmapObject.Type.EVENT).RefreshPool(true);
 }
Exemple #26
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in removedConflictObjects)
     {
         param.collections.ForEach(x => x.DeleteObject(obj));
     }
     containers.Clear();
     foreach (BeatmapObject con in data)
     {
         containers.Add(param.collections.Where(x => x.ContainerType == con.beatmapType).FirstOrDefault()?.SpawnObject(
                            BeatmapObject.GenerateCopy(con), out _));
     }
 }
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObject obj in removedConflictObjects)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType).DeleteObject(obj, false, false);
     }
     RefreshPools(Data);
     foreach (BeatmapObject con in Data)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(con.beatmapType)?.SpawnObject(con, refreshesPool: false);
     }
     RefreshPools(Data);
 }
Exemple #28
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     SelectionController.DeselectAll();
     foreach (BeatmapObject obj in Data)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType).SpawnObject(obj, false, false);
         SelectionController.Select(obj, true, false, false);
     }
     foreach (BeatmapObject obj in removed)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.beatmapType).DeleteObject(obj, false);
     }
     RefreshPools(Data);
 }
Exemple #29
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     foreach (BeatmapObjectContainer obj in removedConflictObjects)
     {
         BeatmapObjectContainerCollection.GetCollectionForType(obj.objectData.beatmapType).DeleteObject(obj, false);
     }
     containers.Clear();
     foreach (BeatmapObject con in data)
     {
         BeatmapObject          copy        = BeatmapObject.GenerateCopy(con);
         BeatmapObjectContainer conflicting = BeatmapObjectContainerCollection.GetCollectionForType(con.beatmapType)?.SpawnObject(copy);
         containers.Add(conflicting);
     }
     param.tracksManager.RefreshTracks();
 }
Exemple #30
0
 public override void Redo(BeatmapActionContainer.BeatmapActionParams param)
 {
     generatedObjects.Clear();
     foreach (BeatmapObject obj in generatedData)
     {
         if (obj == null)
         {
             continue;
         }
         generatedObjects.Add(param.events.SpawnObject(data));
     }
     SelectionController.SelectedObjects.Clear();
     SelectionController.SelectedObjects.AddRange(generatedObjects);
     SelectionController.RefreshSelectionMaterial(false);
 }