core/client/game/src/shineLib/spine-unity/SkeletonExtensions.cs
/// <summary>
/// Shortcut for posing a skeleton at a specific time. Time is in seconds. (frameNumber / 30f) will give you seconds.
/// If you need to do this often, you should get the Animation object yourself using skeleton.data.FindAnimation. and call Apply on that.</summary>
/// <param name = "skeleton">The skeleton to pose.</param>
/// <param name="animationName">The name of the animation to use.</param>
/// <param name = "time">The time of the pose within the animation.</param>
/// <param name = "loop">Wraps the time around if it is longer than the duration of the animation.</param>
Shortcut for posing a skeleton at a specific time. Time is in seconds. (frameNumber / 30f) will give you seconds.
If you need to do this often, you should get the Animation object yourself using skeleton.data.FindAnimation. and call Apply on that.
Shortcut for posing a skeleton at a specific time . Time is in seconds . ( frameNumber / 30f ) will give you seconds . If you need to do this often you should get the Animation object yourself using skeleton . data . FindAnimation . and call Apply on that .
public static void PoseWithAnimation (this Skeleton skeleton, string animationName, float time, bool loop = false) {
			Spine.Animation animation = skeleton.data.FindAnimation(animationName);
			if (animation == null) return;
			animation.Apply(skeleton, 0, time, loop, null, 1f, MixPose.Setup, MixDirection.In);
		}
public static void PoseWithAnimation ( this Skeleton skeleton , string animationName , float time , bool loop = false ) { Spine . Animation animation = skeleton . data . FindAnimation ( animationName ) ; if ( animation == null ) return ; animation . Apply ( skeleton , 0 , time , loop , null , 1f , MixPose . Setup , MixDirection . In ) ; }
Shortcut for posing a skeleton at a specific time.
Shortcut for posing a skeleton at a specific time .
// Fail loud when skeleton.data is null.
Skeleton
this
animationName
string
The name of the animation to use.
The name of the animation to use .
time
float
The time of the pose within the animation.
The time of the pose within the animation .
loop
bool
Wraps the time around if it is longer than the duration of the animation.
Wraps the time around if it is longer than the duration of the animation .
skeleton
The skeleton to pose.
The skeleton to pose .