コード例 #1
0
        /// <summary>
        /// Constructor only to be called in <see cref="RWNodeFactory.GetNode(RWNode, BinaryReader)"/>.
        /// </summary>
        internal RWTextureDictionary(RWNodeFactory.RWNodeInfo header, BinaryReader reader)
            : base(header)
        {
            _struct = RWNodeFactory.GetNode<RWTextureDictionaryStruct>(this, reader);
            _textures = new List<RWTextureNative>(_struct.TextureCount);

            for (int i = 0; i < _struct.TextureCount; i++)
            {
                _textures.Add(RWNodeFactory.GetNode<RWTextureNative>(this, reader));
            }

            _extension = RWNodeFactory.GetNode<RWExtension>(this, reader);
        }
コード例 #2
0
 /// <summary>
 /// Initialize a new <see cref="RWTextureDictionary"/> instance with an <see cref="IList{T}"/> of texture nodes.
 /// </summary>
 /// <param name="textures"><see cref="IList{T}"/>containing texture nodes to initialize the dictionary with.</param> 
 public RWTextureDictionary(IList<RWTextureNative> textures)
     : base(RWNodeType.TextureDictionary)
 {
     Textures = textures.ToList();
     _extension = new RWExtension(this);
     _struct = new RWTextureDictionaryStruct(this);
 }
コード例 #3
0
 /// <summary>
 /// Initialize a new empty <see cref="RWTextureDictionary"/> instance.
 /// </summary>
 public RWTextureDictionary()
     : base(RWNodeType.TextureDictionary)
 {
     _struct = new RWTextureDictionaryStruct(this);
     _textures = new List<RWTextureNative>();
     _extension = new RWExtension(this);
 }