Esempio n. 1
0
        public void Read(AssetReader reader)
        {
            Texture.Read(reader);
            if (IsReadAlphaTexture(reader.Version))
            {
                AlphaTexture.Read(reader);
            }
            if (IsReadSecondaryTextures(reader.Version))
            {
                m_secondaryTextures = reader.ReadAssetArray <SecondarySpriteTexture>();
            }

            if (IsReadVertices(reader.Version))
            {
                m_vertices = reader.ReadAssetArray <SpriteVertex>();
                m_indices  = reader.ReadUInt16Array();
                reader.AlignStream(AlignType.Align4);
            }
            else
            {
                m_subMeshes   = reader.ReadAssetArray <SubMesh>();
                m_indexBuffer = reader.ReadByteArray();
                reader.AlignStream(AlignType.Align4);

                VertexData.Read(reader);
            }
            if (IsReadBindpose(reader.Version))
            {
                m_bindpose = reader.ReadAssetArray <Matrix4x4f>();
            }
            if (IsReadSourceSkin(reader.Version))
            {
                m_sourceSkin = reader.ReadAssetArray <BoneWeights4>();
            }

            TextureRect.Read(reader);
            TextureRectOffset.Read(reader);
            if (IsReadAtlasRectOffset(reader.Version))
            {
                AtlasRectOffset.Read(reader);
            }
            SettingsRaw = reader.ReadUInt32();
            if (IsReadUVTransform(reader.Version))
            {
                UVTransform.Read(reader);
            }
            if (IsReadDownscaleMultiplier(reader.Version))
            {
                DownscaleMultiplier = reader.ReadSingle();
            }
        }
Esempio n. 2
0
 public void Read(AssetReader reader)
 {
     Texture.Read(reader);
     AlphaTexture.Read(reader);
     TextureRect.Read(reader);
     TextureRectOffset.Read(reader);
     if (HasAtlasRectOffset(reader.Version))
     {
         AtlasRectOffset.Read(reader);
     }
     UVTransform.Read(reader);
     DownscaleMultiplier = reader.ReadSingle();
     SettingsRaw         = reader.ReadUInt32();
 }
 public void Read(AssetStream stream)
 {
     Texture.Read(stream);
     AlphaTexture.Read(stream);
     Texture.Read(stream);
     TextureRectOffset.Read(stream);
     if (IsReadAtlasRectOffset(stream.Version))
     {
         AtlasRectOffset.Read(stream);
     }
     UVTransform.Read(stream);
     DownscaleMultiplier = stream.ReadSingle();
     SettingsRaw         = stream.ReadUInt32();
 }
Esempio n. 4
0
        public void Read(AssetStream stream)
        {
            Texture.Read(stream);
            if (IsReadAlphaTexture(stream.Version))
            {
                AlphaTexture.Read(stream);
            }

            if (IsReadVertices(stream.Version))
            {
                m_vertices = stream.ReadArray <SpriteVertex>();
                m_indices  = stream.ReadUInt16Array();
                stream.AlignStream(AlignType.Align4);
            }
            else
            {
                m_subMeshes   = stream.ReadArray <SubMesh>();
                m_indexBuffer = stream.ReadByteArray();
                stream.AlignStream(AlignType.Align4);

                VertexData.Read(stream);
            }
            if (IsReadBindpose(stream.Version))
            {
                m_bindpose = stream.ReadArray <Matrix4x4f>();
            }
            if (IsReadSourceSkin(stream.Version))
            {
                m_sourceSkin = stream.ReadArray <BoneWeights4>();
            }

            TextureRect.Read(stream);
            TextureRectOffset.Read(stream);
            if (IsReadAtlasRectOffset(stream.Version))
            {
                AtlasRectOffset.Read(stream);
            }
            SettingsRaw = stream.ReadUInt32();
            if (IsReadUVTransform(stream.Version))
            {
                UVTransform.Read(stream);
            }
            if (IsReadDownscaleMultiplier(stream.Version))
            {
                DownscaleMultiplier = stream.ReadSingle();
            }
        }