Mario escribióAll we see is a call to SetAnimation()
that's relevant to Spine. And that will do what the documentation says: playback the animation at the speed you created in the Spine Editor, unless you modified TrackEntry.TimeScale, which is not happening here, or pass a delta time to AnimationState.Update()
that is not based on wall clock time (default).
My guess is that you are calling your SetState()
method over and over again, at least once per frame. That will restart the animation every time you call SetAnimation()
.
SetCharacterState("DASH"); -do you mean that this line???
could you write then what to write instead so that Dash is played completely? as an example
public void SetAnimation(AnimationReferenceAsset animation, bool loop, float timeScale)
{
if (animation.name.Equals(currentAnimation))
{
return;
}
Spine.TrackEntry animationEntry = skeletonAnimation.state.SetAnimation(0, animation, loop);
animationEntry.TimeScale = timeScale;
animationEntry.Complete += animationEntry_Complete;
currentAnimation = animation.name;
}
here is my code. Now, could you help???
public void SetAnimation(AnimationReferenceAsset animation, bool loop, float timeScale)
{
if (animation.name.Equals(currentAnimation))
{
return;
}
Spine.TrackEntry animationEntry = skeletonAnimation.state.SetAnimation(0, animation, loop);
animationEntry.TimeScale = timeScale;
animationEntry.Complete += animationEntry_Complete;
currentAnimation = animation.name;
}
here is my code. Now, could you help???
public void SetAnimation(AnimationReferenceAsset animation, bool loop, float timeScale)
{
if (animation.name.Equals(currentAnimation))
{
return;
}
Spine.TrackEntry animationEntry = skeletonAnimation.state.SetAnimation(0, animation, loop);
animationEntry.TimeScale = timeScale;
animationEntry.Complete += animationEntry_Complete;
currentAnimation = animation.name;
}
here is my code. Now, could you help???