Exemple #1
0
        public void Redo()
        {
            if (redoActions.Count <= 0)
            {
                return;
            }

            NRAction action = redoActions.Last();

            Debug.Log("Redoing action:" + action.ToString());

            action.DoAction(timeline);

            actions.Add(action);
            redoActions.RemoveAt(redoActions.Count - 1);
        }
        public void Undo()
        {
            if (actions.Count <= 0)
            {
                return;
            }

            NRAction action = actions.Last();

            Debug.Log("Undoing action:" + action.ToString());

            action.UndoAction(timeline);

            redoActions.Add(action);
            actions.RemoveAt(actions.Count - 1);

            timeline.ReapplyScale();
        }