设置动画立即生效

This commit is contained in:
ww-rm
2025-03-03 18:34:44 +08:00
parent d09b2025dd
commit 2f64e8d338
2 changed files with 2 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ namespace SpineViewer.Spine.Implementations
public override string CurrentAnimation
{
get => animationState.GetCurrent(0)?.Animation.Name ?? DefaultAnimationName;
set { if (animationNames.Contains(value)) animationState.SetAnimation(0, value, true); }
set { if (animationNames.Contains(value)) { animationState.SetAnimation(0, value, true); Update(0); } }
}
public override RectangleF Bounds

View File

@@ -173,7 +173,7 @@ namespace SpineViewer.Spine.Implementations
public override string CurrentAnimation
{
get => animationState.GetCurrent(0)?.Animation.Name ?? DefaultAnimationName;
set { if (animationNames.Contains(value)) animationState.SetAnimation(0, value, true); }
set { if (animationNames.Contains(value)) { animationState.SetAnimation(0, value, true); Update(0); } }
}
public override RectangleF Bounds