C# Class Spine.Unity.SkeletonAnimation

Inheritance: SkeletonRenderer, ISkeletonAnimation
显示文件 Open project: EsotericSoftware/spine-runtimes Class Usage Examples

Public Properties

Property Type Description
loop bool
state Spine.AnimationState
timeScale float

Public Methods

Method Description
AddToGameObject ( GameObject gameObject, SkeletonDataAsset skeletonDataAsset ) : SkeletonAnimation

Adds and prepares a SkeletonAnimation component to a GameObject at runtime.

Initialize ( bool overwrite ) : void
NewSkeletonAnimationGameObject ( SkeletonDataAsset skeletonDataAsset ) : SkeletonAnimation

Instantiates a new UnityEngine.GameObject and adds a prepared SkeletonAnimation component to it.

Update ( ) : void
Update ( float deltaTime ) : void

Protected Methods

Method Description
ClearState ( ) : void

Method Details

AddToGameObject() public static method

Adds and prepares a SkeletonAnimation component to a GameObject at runtime.
public static AddToGameObject ( GameObject gameObject, SkeletonDataAsset skeletonDataAsset ) : SkeletonAnimation
gameObject UnityEngine.GameObject
skeletonDataAsset SkeletonDataAsset
return SkeletonAnimation

ClearState() protected method

protected ClearState ( ) : void
return void

Initialize() public method

public Initialize ( bool overwrite ) : void
overwrite bool
return void

NewSkeletonAnimationGameObject() public static method

Instantiates a new UnityEngine.GameObject and adds a prepared SkeletonAnimation component to it.
public static NewSkeletonAnimationGameObject ( SkeletonDataAsset skeletonDataAsset ) : SkeletonAnimation
skeletonDataAsset SkeletonDataAsset
return SkeletonAnimation

Update() public method

public Update ( ) : void
return void

Update() public method

public Update ( float deltaTime ) : void
deltaTime float
return void

Property Details

loop public_oe property

Whether or not AnimationName should loop. This only applies to the initial animation specified in the inspector, or any subsequent Animations played through .AnimationName. Animations set through state.SetAnimation are unaffected.
public bool loop
return bool

state public_oe property

This is the Spine.AnimationState object of this SkeletonAnimation. You can control animations through it. Note that this object, like .skeleton, is not guaranteed to exist in Awake. Do all accesses and caching to it in Start
public Spine.AnimationState state
return Spine.AnimationState

timeScale public_oe property

The rate at which animations progress over time. 1 means 100%. 0.5 means 50%.
AnimationState and TrackEntry also have their own timeScale. These are combined multiplicatively.
public float timeScale
return float