C# Class Spine.SkeletonExtensions

Show file Open project: EsotericSoftware/spine-runtimes

Public Methods

Method Description
InheritsRotation ( this mode ) : bool
InheritsScale ( this mode ) : bool
IsWeighted ( this va ) : bool
PoseWithAnimation ( this skeleton, string animationName, float time, bool loop ) : void

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.

SetAttachmentToSetupPose ( this slot ) : void

Sets a slot's attachment to setup pose. If you have the slotIndex, Skeleton.SetSlotAttachmentToSetupPose is faster.

SetColorToSetupPose ( this slot ) : void

Resets the color of a slot to Setup Pose value.

SetDrawOrderToSetupPose ( this skeleton ) : void

Resets the DrawOrder to the Setup Pose's draw order

SetKeyedItemsToSetupPose ( this animation, Skeleton skeleton ) : void

Resets Skeleton parts to Setup Pose according to a Spine.Animation's keyed items.

SetSlotAttachmentToSetupPose ( this skeleton, int slotIndex ) : void

Resets the attachment of slot at a given slotIndex to setup pose. This is faster than Slot.SetAttachmentToSetupPose.

Private Methods

Method Description
Apply ( this animation, Skeleton skeleton, float lastTime, float time, bool loop, ExposedList events ) : void

Method Details

InheritsRotation() public static method

public static InheritsRotation ( this mode ) : bool
mode this
return bool

InheritsScale() public static method

public static InheritsScale ( this mode ) : bool
mode this
return bool

IsWeighted() public static method

public static IsWeighted ( this va ) : bool
va this
return bool

PoseWithAnimation() public static method

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 PoseWithAnimation ( this skeleton, string animationName, float time, bool loop ) : void
skeleton this The skeleton to pose.
animationName string The name of the animation to use.
time float The time of the pose within the animation.
loop bool Wraps the time around if it is longer than the duration of the animation.
return void

SetAttachmentToSetupPose() public static method

Sets a slot's attachment to setup pose. If you have the slotIndex, Skeleton.SetSlotAttachmentToSetupPose is faster.
public static SetAttachmentToSetupPose ( this slot ) : void
slot this
return void

SetColorToSetupPose() public static method

Resets the color of a slot to Setup Pose value.
public static SetColorToSetupPose ( this slot ) : void
slot this
return void

SetDrawOrderToSetupPose() public static method

Resets the DrawOrder to the Setup Pose's draw order
public static SetDrawOrderToSetupPose ( this skeleton ) : void
skeleton this
return void

SetKeyedItemsToSetupPose() public static method

Resets Skeleton parts to Setup Pose according to a Spine.Animation's keyed items.
public static SetKeyedItemsToSetupPose ( this animation, Skeleton skeleton ) : void
animation this
skeleton Skeleton
return void

SetSlotAttachmentToSetupPose() public static method

Resets the attachment of slot at a given slotIndex to setup pose. This is faster than Slot.SetAttachmentToSetupPose.
public static SetSlotAttachmentToSetupPose ( this skeleton, int slotIndex ) : void
skeleton this
slotIndex int
return void