Closed Martenfur closed 4 years ago
Not really. You can do something as simple as:
var factory = new DefaultProviderFactory<ISprite, SoundEffect>(new Config());
var loader = new SpriterContentLoader(Content, scmlPath);
loader.Fill(factory);
var animator = new MonoGameAnimator(loader.Spriter.Entities.First(), factory);
My version is twice as simple, tho. : - )
Also this way you'll create a separate pool for every single animation, which is a waste. n fact, I don't understand why you even need to expose the pool and pass it separately. You can just make is a private static field.
I agree, it is twice as simple.
I exposed the pool because:
As I mention for other things as well, version 2 SHOULD handle all of this better, without really the need for pooling in the first place.
This is what you need to do to set up a single animation.
This is horribly overcomplicated. Ideally, it should look roughly like this:
Additional configs could be moved away to a separate controller class.