public void Redo() { if (m_redoCommandStack.Count == 0) { throw new Exception("No commands to redo"); } Command command = m_redoCommandStack.Pop(); command.Do(); m_undoCommandStack.Push(command); }
public void Do(Command command) { command.Do(); m_undoCommandStack.Push(command); m_redoCommandStack.Clear(); }
public void Do(Command command) { command.Do(); m_undoCommandStack.Push(command); m_redoCommandStack.Clear(); }