diff --git a/Assets/Scripts/Core/UndoManager.cs b/Assets/Scripts/Core/UndoManager.cs index c9b9f08..d05cffc 100644 --- a/Assets/Scripts/Core/UndoManager.cs +++ b/Assets/Scripts/Core/UndoManager.cs @@ -21,6 +21,11 @@ public static class ActionHistory public static Stack History = new Stack(); + public static void Push(ActionType type, MonoBehaviour handler, int extra = 0) + { + History.Push(new HistoryItem { Type = type, Handler = handler, ExtraInt = extra }); + } + public static bool TryUndoLast() { if (History.Count == 0) return false;