mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-15 15:09:29 +00:00
Set initial frame when animation is changed (#976)
Co-authored-by: Wolf <wolfgang.s@xardsyn.com>
This commit is contained in:
committed by
GitHub
parent
e5f5bac062
commit
b8d9203ef6
@@ -65,6 +65,8 @@ public class AnimatedSprite : Sprite
|
||||
{
|
||||
_animation = _spriteSheet.GetAnimation(name);
|
||||
Controller = new AnimationController(_animation);
|
||||
TextureRegion = _spriteSheet.TextureAtlas[Controller.CurrentFrame];
|
||||
|
||||
return Controller;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user