Can anybody help me clarify how the AtlasPage object is used in Spine?
I have some C# code below that loads the spineboy skeleton into Monogame. How is the AtlasPage used? The documentation seems a little fuzzy to me on this. You will see how I am passing null down below which is incorrect of course, but none of the samples seem to show how the AtlasPage is used. I think my code would work if I knew how to initialize the AtlasPage object. Are there any good C# examples out there anywhere?
Thanks!
Tim
Here is my call to my own SpineTextLoader class
var texture = Content.Load<Texture2D>("spineboy");
SpineTextLoader textureLoader = new SpineTextLoader();
textureLoader.Load(null, texture);
Here is my SpineTextLoader class with the Load method overloaded.
class SpineTextLoader : Game, Spine.TextureLoader
{
public void Load(AtlasPage page, string path)
{
}
public void Load(AtlasPage page, object texture)
{
Texture2D texture2D = (Texture2D)texture;
page.rendererObject = texture2D;
page.width = texture2D.Width;
page.height = texture2D.Height;
}
public void Unload(Object rendererObject)
{
Texture texture = (Texture)rendererObject;
texture.Dispose();
}
}