コード例 #1
0
        public override void ReadMetadata(BinaryReader stream, int totalSize)
        {
            var version = stream.ReadUInt32();

            BillboardGuid = stream.ReadGuid();
            var subVersion = stream.ReadUInt32();

            UnknownUint1      = stream.ReadUInt32();
            Flags             = stream.ReadStringList();
            UnknownUint2      = stream.ReadUInt32();
            VertexLayoutFlags = stream.ReadStringList();
            BlendMode         = stream.ReadSizedString();
            Shader            = new AssetDependence <Shader>(stream.ReadGuid());
            var texCount = stream.ReadInt32();

            Textures.Clear();
            for (int i = 0; i < texCount; i++)
            {
                var index   = stream.ReadInt32();
                var texGuid = stream.ReadGuid();
                Textures[index] = new AssetDependence <Texture>(texGuid);
            }

            AlphaTest           = stream.ReadSingle();
            ShaderMaterialFlags = stream.ReadStringList();
            ExtraMaterialSettings.Load(stream, subVersion);
        }
コード例 #2
0
        public Material() : base(TYPE_GUID)
        {
            Flags             = new List <string>();
            VertexLayoutFlags = new List <string>();
            BlendMode         = "no_alpha_blend";
            Shader            = AssetDependence <Shader> .CreateEmpty();

            Textures              = new SortedDictionary <int, AssetDependence <Texture> >();
            ShaderMaterialFlags   = new List <string>();
            ExtraMaterialSettings = new ExtraMaterialSetting();
        }
コード例 #3
0
 public Mesh()
 {
     Name             = String.Empty;
     Lod              = 0;
     IsCompleteMesh   = true;
     UnknownUint1     = 2;
     Material         = new AssetDependence <Material>();
     SecondMaterial   = new AssetDependence <Material>();
     BoundingBox      = new BoundingBox();
     MaterialFlags    = new List <string>();
     ClothingMaterial = new ClothingMaterial();
 }
コード例 #4
0
        public Mesh(BinaryReader stream)
        {
            IsCompleteMesh = stream.ReadBoolean();
            Lod            = stream.ReadInt32();
            UnknownUint1   = stream.ReadUInt32();
            SecondMaterial = new AssetDependence <Material>(stream.ReadGuid());
            var subVersion = stream.ReadUInt32();

            Guid            = stream.ReadGuid();
            Name            = stream.ReadSizedString();
            UnknownUInt2    = stream.ReadUInt32();          // always 0
            Flags           = stream.ReadStringList();
            Material        = new AssetDependence <Material>(stream.ReadGuid());
            FactorColor     = stream.ReadVec4();
            Factor2Color    = stream.ReadVec4();
            VectorArgument  = stream.ReadVec4();
            VectorArgument2 = stream.ReadVec4();
            VertexKeyCount  = stream.ReadInt32();
            PositionCount   = stream.ReadInt32();
            FaceCount       = stream.ReadInt32();
            VertexCount     = stream.ReadInt32();
            SkinDataSize    = stream.ReadInt32();
            int boundingBoxType = stream.ReadInt32();

            Debug.Assert(boundingBoxType == 0);             // should always 0
            BoundingBox      = new BoundingBox(stream);
            UnknownInt2      = stream.ReadInt32();
            MaterialFlags    = stream.ReadStringList();
            UnknownFloat1    = stream.ReadSingle();
            ClothingMaterial = new ClothingMaterial(stream);
            UnknownInt3      = stream.ReadInt32();
            UnknownBool1     = stream.ReadBoolean();
            UnknownBool2     = stream.ReadBoolean();
            if (subVersion >= 1)
            {
                ClothingMaterial.ReadExtraData(stream);
                //UnknownFloat2 = stream.ReadSingle();
                //UnknownFloat3 = stream.ReadSingle();
                UnknownBool3 = stream.ReadBoolean();
            }
        }
コード例 #5
0
 public UnresolvedDependenceException(AssetDependence <T> dependence) : base()
 {
 }
コード例 #6
0
 public ExpiredDependenceException(AssetDependence <T> dependence) : base()
 {
 }
コード例 #7
0
 public ResolveFailedException(AssetDependence <T> dependence) : base()
 {
 }