Beispiel #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);
        }
Beispiel #2
0
        public void AddAction(NRAction action)
        {
            action.DoAction(timeline);

            if (actions.Count <= maxSavedActions)
            {
                actions.Add(action);
            }
            else
            {
                while (maxSavedActions > actions.Count)
                {
                    actions.RemoveAt(0);
                }

                actions.Add(action);
            }

            redoActions = new List <NRAction>();
        }