Class ccs.Tween

Class Summary
Constructor Attributes Constructor Name and Description
 
ccs.Tween(The)
The tween class for Armature.

Method Summary

Class Detail

ccs.Tween(The)
The tween class for Armature.
Parameters:
{ccs.Bone} The
bone to be animated

Field Detail

{ccs.ArmatureAnimation} animation
- The animation

Method Detail

  • arriveKeyFrame(keyFrameData)
    Update display index and process the key frame event when arrived a key frame
    Parameters:
    {ccs.FrameData} keyFrameData
  • <static> {ccs.Tween} ccs.Tween.create(bone)
    Allocates and initializes a ArmatureAnimation.
    Parameters:
    {ccs.Bone} bone
    Deprecated:
    since v3.1, please use new construction instead
    Returns:
    {ccs.Tween}
  • {ccs.ArmatureAnimation} getAnimation()
    Returns Armature animation of ccs.Tween.
    Returns:
    {ccs.ArmatureAnimation}
  • gotoAndPause(frameIndex)
    Goes to specified frame and pauses frame.
    Parameters:
    {Number} frameIndex
  • gotoAndPlay(frameIndex)
    Goes to specified frame and plays frame.
    Parameters:
    {Number} frameIndex
  • {Boolean} init(bone)
    initializes a ccs.Tween with a CCBone
    Parameters:
    {ccs.Bone} bone
    Returns:
    {Boolean}
  • play(movementBoneData, durationTo, durationTween, loop, tweenEasing)
    Plays the tween.
    Parameters:
    {ccs.MovementBoneData} movementBoneData
    {Number} durationTo
    {Number} durationTween
    {Boolean} loop
    {ccs.TweenType} tweenEasing
  • setAnimation(animation)
    Sets Armature animation to ccs.Tween.
    Parameters:
    {ccs.ArmatureAnimation} animation
  • setBetween(from, to, limit)
    Calculate the between value of _from and _to, and give it to between frame data
    Parameters:
    {ccs.FrameData} from
    {ccs.FrameData} to
    {Boolean} limit Optional, Default: true
  • setMovementBoneData(data)
    Sets movement bone data to ccs.Tween.
    Parameters:
    data
  • tweenColorTo(percent, node)
    According to the percent to calculate current color with tween effect
    Parameters:
    {Number} percent
    {ccs.FrameData} node
  • {ccs.FrameData} tweenNodeTo(percent, node)
    According to the percent to calculate current CCFrameData with tween effect
    Parameters:
    {Number} percent
    {ccs.FrameData} node Optional
    Returns:
    {ccs.FrameData}
  • {Number} updateFrameData(currentPercent)
    Calculate which frame arrived, and if current frame have event, then call the event listener
    Parameters:
    {Number} currentPercent
    Returns:
    {Number}
  • updateHandler()
    update will call this handler, you can handle your logic here