private GameObject InitRoot(RootTag tag)
        {
            var go = Root.GetChild(tag.ToString());

            if (!go)
            {
                go = Root.AddNewChildTo(tag.ToString());
            }
            int index = (int)tag;

            _tag2go[index] = go;
            return(_tag2go[index]);
        }
예제 #2
0
파일: NbtFile.cs 프로젝트: Jorch72/CS-fNbt
 public string ToString([NotNull] string indentString)
 {
     return(RootTag.ToString(indentString));
 }
예제 #3
0
파일: NbtFile.cs 프로젝트: Jorch72/CS-fNbt
 /// <summary> Prints contents of the root tag, and any child tags, to a string. </summary>
 public override string ToString()
 {
     return(RootTag.ToString(NbtTag.DefaultIndentString));
 }
예제 #4
0
파일: NbtFile.cs 프로젝트: peter1745/fNbt
 /// <summary> Prints contents of the root tag, and any child tags, to a string.
 /// Indents the string using multiples of the given indentation string. </summary>
 /// <param name="indentString"> String to be used for indentation. </param>
 /// <returns> A string representing contents of this tag, and all child tags (if any). </returns>
 /// <exception cref="ArgumentNullException"> <paramref name="indentString"/> is <c>null</c>. </exception>
 public string ToString(string indentString)
 {
     return(RootTag.ToString(indentString));
 }