Packagealternativa.engine3d.animation
Classpublic class AnimationSwitcher
InheritanceAnimationSwitcher Inheritance AnimationNode Inheritance Object

The animation switcher performs animation blending and active animation switching.



Public Properties
 PropertyDefined By
  active : AnimationNode
[read-only] The current active animation.
AnimationSwitcher
 InheritedisActive : Boolean
[read-only] Determines if the animation is active.
AnimationNode
 Inheritedparent : AnimationNode
[read-only] Parent of this node in animation tree hierarchy.
AnimationNode
 Inheritedspeed : Number = 1
Animation speed.
AnimationNode
Public Methods
 MethodDefined By
  
activate(animation:AnimationNode, time:Number = 0):void
Activates specified animation during given time interval.
AnimationSwitcher
  
Adds a new animation.
AnimationSwitcher
  
Returns the child animation that exists at the specified index.
AnimationSwitcher
  
Returns number of animations.
AnimationSwitcher
  
Removes child animation node.
AnimationSwitcher
Property Detail
activeproperty
active:AnimationNode  [read-only]

The current active animation. To change active animation use activate().


Implementation
    public function get active():AnimationNode

See also

Method Detail
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.

Returns
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.

Returns
AnimationNode
numAnimations()method 
public function numAnimations():int

Returns number of animations.

Returns
int
removeAnimation()method 
public function removeAnimation(animation:AnimationNode):AnimationNode

Removes child animation node.

Parameters

animation:AnimationNode — Animation node to remove.

Returns
AnimationNode