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;
    }
Beispiel #2
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;
    }