Beispiel #1
0
    public void AddToUndo(Dictionary <GameObject, UndoRedoState> undoGroup)
    {
        redoStack.Clear();
        Dictionary <GameObject, UndoRedoState> groupToRemove = undoStack.Push(undoGroup);

        if (groupToRemove == null)
        {
            return;
        }
        RemoveFromUndoStack(groupToRemove);
    }
Beispiel #2
0
        public void Clear_removeAll()
        {
            var ms = new MaxStack <string>(3);

            ms.Push("1");
            ms.Push("2");
            ms.Push("3");
            ms.Clear();
            Assert.IsFalse(ms.Contains("3"));
            Assert.IsFalse(ms.Contains("2"));
            Assert.IsFalse(ms.Contains("1"));
            Assert.AreEqual(3, ms.MaxSize);
        }
Beispiel #3
0
 void ClearUndoRedoStack()
 {
     undoinputfieldstack.Clear();
     redoinputfieldstack.Clear();
 }