public void Parse(AssetsFile assetsFile, AssetsObject owner, AssetsReader reader) { Texture = SmartPtr <Texture2DObject> .Read(assetsFile, owner, reader); AlphaTexture = SmartPtr <Texture2DObject> .Read(assetsFile, owner, reader); SubMeshes = reader.ReadArrayOf(r => new Submesh(reader)); IndexBuffer = reader.ReadArray(); reader.AlignTo(4); VertexData = new VertexData(reader); BindPose = reader.ReadArrayOf(r => r.ReadSingle()); TextureRect = new RectF(reader); TextureRectOffset = new Vector2F(reader); AtlasRectOffset = new Vector2F(reader); SettingsRaw = reader.ReadUInt32(); UVTransform = new Vector4F(reader); DownscaleMultiplier = reader.ReadSingle(); }
public override void ParseObject(AssetsReader reader) { Name = reader.ReadString(); Rect = new RectF(reader); Offset = new Vector2F(reader); Border = new Vector4F(reader); PixelsToUnits = reader.ReadSingle(); Pivot = new Vector2F(reader); Extrude = reader.ReadUInt32(); IsPolygon = reader.ReadBoolean(); reader.AlignTo(4); RenderDataKey = new Map <Guid, long>(reader.ReadGuid(), reader.ReadInt64()); AtlasTags = reader.ReadArrayOf(r => r.ReadString()); SpriteAtlas = SmartPtr <AssetsObject> .Read(ObjectInfo.ParentFile, this, reader); RenderData = new SpriteRenderData(ObjectInfo.ParentFile, this, reader); PhysicsShape = reader.ReadArrayOf(r => r.ReadArrayOf(r2 => new Vector2F(r2))); Bones = reader.ReadArrayOf(r => (ISmartPtr <Transform>)SmartPtr <Transform> .Read(ObjectInfo.ParentFile, this, reader)); }