示例#1
0
        /// <summary>
        /// Applies a new action to the level.
        /// </summary>
        /// <param name="action">The action to apply.</param>
        public void Apply(EditorAction action)
        {
            Unsaved = true;
            action.Apply();

            PastActions.Push(action);
            FutureActions.Clear();
        }
示例#2
0
        /// <summary>
        /// Applies the previously undone action, if one is available.
        /// </summary>
        public void Redo()
        {
            if (CanRedo())
            {
                EditorAction action = FutureActions.Pop();
                action.Apply();
                Unsaved = true;

                PastActions.Push(action);
            }
        }