Пример #1
0
 void GoUp()
 {
     if (nodes == null || nodes.Count == 0)
     {
         IsDone = true;
     }
     else
     {
         NbtWriterNode oldNode = nodes.Pop();
         parentType = oldNode.ParentType;
         listType   = oldNode.ListType;
         listSize   = oldNode.ListSize;
         listIndex  = oldNode.ListIndex;
     }
 }
Пример #2
0
        void GoDown(NbtTagType thisType)
        {
            if (nodes == null)
            {
                nodes = new Stack <NbtWriterNode>();
            }
            var newNode = new NbtWriterNode {
                ParentType = parentType,
                ListType   = listType,
                ListSize   = listSize,
                ListIndex  = listIndex
            };

            nodes.Push(newNode);

            parentType = thisType;
            listType   = NbtTagType.Unknown;
            listSize   = 0;
            listIndex  = 0;
        }
Пример #3
0
        void GoDown(NbtTagType thisType) {
            if (nodes == null) {
                nodes = new Stack<NbtWriterNode>();
            }
            var newNode = new NbtWriterNode {
                ParentType = parentType,
                ListType = listType,
                ListSize = listSize,
                ListIndex = listIndex
            };
            nodes.Push(newNode);

            parentType = thisType;
            listType = NbtTagType.Unknown;
            listSize = 0;
            listIndex = 0;
        }