Example #1
0
    private void DoRedo(BeatmapAction action)
    {
        BeatmapActionParams param = new BeatmapActionParams(this);

        action.Redo(param);
        action.Active = true;
        nodeEditor.ObjectWasSelected();
    }
    public void Redo()
    {
        BeatmapAction firstNotActive = beatmapActions.FirstOrDefault(x => !x.Active);

        if (firstNotActive == null)
        {
            return;
        }
        Debug.Log($"Redid a {firstNotActive.GetType().Name}.");
        BeatmapActionParams param = new BeatmapActionParams(this);

        firstNotActive.Redo(param);
        firstNotActive.Active = true;
    }
    public void Undo()
    {
        BeatmapAction lastActive = beatmapActions.LastOrDefault(x => x.Active);

        if (lastActive == null)
        {
            return;
        }
        Debug.Log($"Undid a {lastActive.GetType().Name}.");
        BeatmapActionParams param = new BeatmapActionParams(this);

        lastActive.Undo(param);
        lastActive.Active = false;
    }
Example #4
0
    public void Redo()
    {
        if (!beatmapActions.Any())
        {
            return;
        }
        BeatmapAction firstNotActive = beatmapActions.FirstOrDefault(x => !x.Active);

        if (firstNotActive == null)
        {
            return;
        }
        Debug.Log($"Redid a {firstNotActive?.GetType()?.Name ?? "UNKNOWN"}. ({firstNotActive?.Comment ?? "Unknown comment."})");
        BeatmapActionParams param = new BeatmapActionParams(this);

        firstNotActive.Redo(param);
        firstNotActive.Active = true;
    }
Example #5
0
    public void Undo()
    {
        if (!beatmapActions.Any())
        {
            return;
        }
        BeatmapAction lastActive = beatmapActions.LastOrDefault(x => x.Active);

        if (lastActive == null)
        {
            return;
        }
        Debug.Log($"Undid a {lastActive?.GetType()?.Name ?? "UNKNOWN"}. ({lastActive?.Comment ?? "Unknown comment."})");
        BeatmapActionParams param = new BeatmapActionParams(this);

        lastActive.Undo(param);
        lastActive.Active = false;
    }