Class SpineInstance
- Namespace
- AO
- Assembly
- CoreAssembly.dll
Backing instance of a spine skeleton. See SpineSkeletonAsset.
public class SpineInstance
- Inheritance
-
SpineInstance
- Inherited Members
- Extension Methods
Properties
ColorMultiplier
Color multiplier to use when rendering.
public Vector4 ColorMultiplier { get; set; }
Property Value
Scale
Get/set the scale of the spine instance
public Vector2 Scale { get; set; }
Property Value
Speed
Animation speed of the spine instance.
public float Speed { get; set; }
Property Value
StateMachine
Get the state machine for the spine instance
public StateMachine StateMachine { get; }
Property Value
Methods
Destroy()
Destroy the spine instance
public void Destroy()
DisableAllSkins()
Disable all skins for the spine instance
public void DisableAllSkins()
Remarks
You must call RefreshSkins after this to see the changes
DisableSkin(string)
Disable a skin for the spine instance
public bool DisableSkin(string skin)
Parameters
skin
string
Returns
Remarks
You must call RefreshSkins after this to see the changes
EnableSkin(string)
Additively enable a skin for the spine instance
public bool EnableSkin(string skin)
Parameters
skin
string
Returns
Remarks
You must call RefreshSkins after this to see the changes
GetBonePosition(string)
public Vector2 GetBonePosition(string bone)
Parameters
bone
string
Returns
GetSkins()
public string[] GetSkins()
Returns
- string[]
Make()
Create a new spine instance
public static SpineInstance Make()
Returns
RefreshSkins()
Refresh the skins for the spine instance.
public void RefreshSkins()
SetAnimation(string, bool, int, float)
Set the animation for the spine instance
public bool SetAnimation(string animation, bool loop, int track = 0, float speed = 1)
Parameters
Returns
SetBonePosition(string, Vector2)
public void SetBonePosition(string bone, Vector2 position)
Parameters
SetSkeleton(SpineSkeletonAsset)
Set the skeleton for the spine instance
public void SetSkeleton(SpineSkeletonAsset asset)
Parameters
asset
SpineSkeletonAsset
SetSkin(string)
Disable all other skins and set this one
public bool SetSkin(string skin)
Parameters
skin
string
Returns
Remarks
You must call RefreshSkins after this to see the changes
SetStateMachine(StateMachine, Entity)
Set the state machine for the spine instance
public void SetStateMachine(StateMachine sm, Entity owner)
Parameters
sm
StateMachineowner
Entity
SetTransformConstraintPosition(string, Vector2)
Set the position of a transform constraint
public void SetTransformConstraintPosition(string name, Vector2 value)
Parameters
SetTransformConstraintRotation(string, float)
Set the rotation of a transform constraint
public void SetTransformConstraintRotation(string name, float value)
Parameters
SetTransformConstraintScale(string, Vector2)
Set the scale of a transform constraint
public void SetTransformConstraintScale(string name, Vector2 value)
Parameters
TrySetToPlayerRig(string, Player)
Attempts to find a player rig (as defined in Edit -> Game Config) that matches rigName.
public bool TrySetToPlayerRig(string rigName, Player player)
Parameters
Returns
Update(float)
Update the spine instance. Usually called every frame
public void Update(float dt)
Parameters
dt
float
Events
OnAnimationEnd
public event Action<string> OnAnimationEnd
Event Type
OnAnimationStart
public event Action<string> OnAnimationStart
Event Type
OnEvent
public event Action<string> OnEvent