/// <summary> /// Adds a BeatmapAction to the stack. /// </summary> /// <param name="action">BeatmapAction to add.</param> /// <param name="perform">If true Redo will be triggered immediately. This means you don't need separate logic to perform the action the first time.</param> public static void AddAction(BeatmapAction action, bool perform = false) { instance.beatmapActions.RemoveAll(x => !x.Active); instance.beatmapActions.Add(action); if (perform) { instance.DoRedo(action); } Debug.Log($"Action of type {action.GetType().Name} added. ({action.Comment})"); }