a.spritestudio.editor.xml.NodeReader.Child C# (CSharp) Method

Child() public method

子供を1つ取得
public Child ( string tag ) : NodeReader
tag string
return NodeReader
        public NodeReader Child( string tag )
        {
            return new NodeReader( node_.SelectSingleNode( tag ) );
        }

Usage Example

コード例 #1
0
            public PartAnimation( NodeReader node )
            {
                partName = node.AtText( "partName" );
                var children = node.Child( "attributes" ).Children( "attribute" );

                var results = new List<SpriteAttribute>();
                foreach ( var child in children ) {
                    string tag = child.Attribute( "tag" ).AtText();
                    var targetType = Type.GetType( "a.spritestudio.editor.attribute." + tag );
                    var attribute = (SpriteAttribute) Activator.CreateInstance( targetType );
                    attribute.Setup( child );
                    results.Add( attribute );
                }
                attributes = results.AsReadOnly();
            }
All Usage Examples Of a.spritestudio.editor.xml.NodeReader::Child