Package | alternativa.engine3d.animation |
Class | public class AnimationSwitcher |
Inheritance | AnimationSwitcher ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
active : AnimationNode [read-only]
The current active animation. | AnimationSwitcher | ||
![]() | isActive : Boolean [read-only]
Determines if the animation is active. | AnimationNode | |
![]() | parent : AnimationNode [read-only]
Parent of this node in animation tree hierarchy. | AnimationNode | |
![]() | speed : Number = 1
Animation speed. | AnimationNode |
Method | Defined By | ||
---|---|---|---|
activate(animation:AnimationNode, time:Number = 0):void
Activates specified animation during given time interval. | AnimationSwitcher | ||
Adds a new animation. | AnimationSwitcher | ||
getAnimationAt(index:int):AnimationNode
Returns the child animation that exists at the specified index. | AnimationSwitcher | ||
numAnimations():int
Returns number of animations. | AnimationSwitcher | ||
Removes child animation node. | AnimationSwitcher |
active | property |
active:AnimationNode
[read-only]
The current active animation. To change active animation use activate()
.
public function get active():AnimationNode
See also
activate | () | method |
public function activate(animation:AnimationNode, time:Number = 0):void
Activates specified animation during given time interval. All the rest animations fade out.
Parameters
animation:AnimationNode — Animation which is set as active.
| |
time:Number (default = 0 ) — The time interval during which the animation becomes fully active (i.e. has full weight).
|
addAnimation | () | method |
public function addAnimation(animation:AnimationNode):AnimationNode
Adds a new animation.
Parameters
animation:AnimationNode — The animation node to add.
|
AnimationNode — Added animation.
|
getAnimationAt | () | method |
public function getAnimationAt(index:int):AnimationNode
Returns the child animation that exists at the specified index.
Parameters
index:int — The index position of the child object.
|
AnimationNode |
numAnimations | () | method |
public function numAnimations():int
Returns number of animations.
Returnsint |
removeAnimation | () | method |
public function removeAnimation(animation:AnimationNode):AnimationNode
Removes child animation node.
Parameters
animation:AnimationNode — Animation node to remove.
|
AnimationNode |