Example #1
0
        internal RWMaterialList(RWNodeFactory.RWNodeInfo header, BinaryReader reader)
            : base(header)
        {
            _struct = RWNodeFactory.GetNode<RWMaterialListStruct>(this, reader);
            _materials = new RWMaterial[_struct.MaterialCount];

            for (int i = 0; i < _materials.Length; i++)
            {
                _materials[i] = RWNodeFactory.GetNode<RWMaterial>(this, reader);
            }
        }
Example #2
0
        public RWMaterialList(IList<string> textureNames)
            : base(RWNodeType.MaterialList)
        {
            _materials = new RWMaterial[textureNames.Count];

            for (int i = 0; i < _materials.Length; i++)
            {
                _materials[i] = new RWMaterial(textureNames[i], this);
            }

            _struct = new RWMaterialListStruct(this);
        }