…what?
Guys, you are totally missing the point.
The TexturePacker is a software that packs the sprites into one atlas. It can rotate the sprites to make the texture atlas smaller. It’s NOT ME who rotated it, and it was not even the goal.
BUT, I found a way, to turn it off (the rotation feature in TexturePacker), because apparently it is not supported (see the original post) in MonoGame.Extended. It’s ok, I didn’t need it anyway.
Currently I use the AnimatedSprite class:
var atlas = contentManager.Load<TextureAtlas>("AtlasData");
var animationFactory = new SpriteSheetAnimationFactory(atlas);
animationFactory.Add("idleDown", new SpriteSheetAnimationData(new[] { 0 }));
animationFactory.Add("walkDown", new SpriteSheetAnimationData(new[] { 0, 1, 2, 3 }));
animationFactory.Add("idleLeft", new SpriteSheetAnimationData(new[] { 4 }));
animationFactory.Add("walkLeft", new SpriteSheetAnimationData(new[] { 4, 5, 6, 7 }));
animationFactory.Add("idleRight", new SpriteSheetAnimationData(new[] { 8 }));
animationFactory.Add("walkRight", new SpriteSheetAnimationData(new[] { 8, 9, 10, 11 }));
animationFactory.Add("idleUp", new SpriteSheetAnimationData(new[] { 12 }));
animationFactory.Add("walkUp", new SpriteSheetAnimationData(new[] { 12, 13, 14, 15 }));
animatedSprite = new AnimatedSprite(animationFactory) { Position = this.Position };
Which is not as good as I wanted, because I need to specify the indices of the frames instead of referring to them with their names.
Although it was not part of the original question, I met a new problem: how can I check currently which animation is playing? There is a member called
private SpriteSheetAnimation _currentAnimation;
in AnimatedSprite, but I can’t access that.