Example #1
0
        public void Add(Vector2Int32 location, Tile tile)
        {
            var undoTile = new UndoTile(location, tile);

            if (undoTile == null)
            {
                throw new Exception("Null undo?");
            }

            lock (UndoSaveLock)
            {
                UndoTiles.Add(undoTile);
                LastTile = undoTile;
            }
            if (UndoTiles.Count > FlushSize)
            {
                Flush();
            }
        }
        public void Add(Vector2Int32 location, Tile tile)
        {
            var undoTile = new UndoTile(location, tile);

            if (undoTile == null)
            {
                throw new Exception("Null undo?");
            }

            lock (UndoSaveLock)
            {
                UndoTiles.Add(undoTile);
                LastTile = undoTile;
            }
            if (UndoTiles.Count > FlushSize)
            {
                Flush();
            }
        }