An utility to group an pre-configure spine animations together as a single montage

Events

@:dox(show)beginAnimation(animation:T):Void

Fired when starting an animation

@:dox(show)completeAnimation(animation:T):Void

Fired when completing an animation

Constructor

new(?settings:SpineMontageSettings<T>)

Create a new spine montage.

Parameters:

settings

if provided, will be used to configure this montage. See SpineMontageSettings for more info.

Variables

spine:Spine

The spine object this montage works with

@:value(null)@observeanimation:T = null

The current animation in montage

@:value(null)read onlydefaults:SpineMontageDefaults = null

Default animation settings

@:value(null)read onlyinitializerName:String = null

Methods

@:value({ bound : true })useSpine(spine:Spine, bound:Bool = true):Void

@:value({ bound : true })createSpine(spineData:SpineData, bound:Bool = true):Void

Create a spine object with the given SpineData object.

Parameters:

spineData

The SpineData object to use

bound

(default true) Whether this spine object is bound to montage lifecycle.

stop():Void

Stop current animation (this is equivalent to montage.animation = null;)

@:value({ reset : false })play(animation:T, reset:Bool = false):Void

montage.play(animation); is stricly equivalent to: montage.animation = animation;

Parameters:

reset

If set to true, will reset the animation to its initial state, even if setting the same animation a second time.

set(key:T, animationInstance:SpineMontageAnimation<T>):Void

Configure an animation for key key

get(key:T):SpineMontageAnimation<T>

Get configured animation for key key

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

components:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun

Creates a new Autorun instance with the given callback associated with the current entity.

Parameters:

run

The run callback

Returns:

The autorun instance

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

Start a tween associated with this entity.

Parameters:

easing

The easing to use

duration

The duration of the tween

fromValue

The start value of the tween

toValue

The end value of the tween

update

An update function called at each iteration of the tween

Returns:

The instance of the created Tween object

eagerTween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

Start an eager tween associated with this entity. This is the same as a regular tween, except that it will start updating itself using current frame's delta time instead of next frame like in a regular tween.

Parameters:

easing

The easing to use

duration

The duration of the tween

fromValue

The start value of the tween

toValue

The end value of the tween

update

An update function called at each iteration of the tween

Returns:

The instance of the created Tween object

@:value({ hasField : false })component<C>(?name:String, ?component:Null<C>, hasField:Bool = false):C