예제 #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
파일: NbtWriter.cs 프로젝트: johndpalm/fNbt
        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;
        }