Class ccs.Tween
- Defined in: CCTween.js
- Extends ccs.ProcessBase
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for ccs.Tween objects.
|
Method Summary
Class Detail
ccs.Tween()
Base class for ccs.Tween objects.
Method Detail
-
arriveKeyFrame(keyFrameData)Update display index and process the key frame event when arrived a key frame
- Parameters:
- {ccs.FrameData} keyFrameData
-
allocates and initializes a ArmatureAnimation.
// example var animation = ccs.ArmatureAnimation.create();
- Parameters:
- {ccs.Bone} bone
- Returns:
- {ccs.ArmatureAnimation}
-
{ccs.ArmatureAnimation} getAnimation()animation getter
- Returns:
- {ccs.ArmatureAnimation}
-
{Boolean} init(bone)init with a CCBone
- Parameters:
- {ccs.Bone} bone
- Returns:
- {Boolean}
-
play(animationName, durationTo, durationTween, loop, tweenEasing)play animation by animation name.
- Parameters:
- {Number} animationName
- The animation name you want to play
- {Number} durationTo
- he frames between two animation changing-over.It's meaning is changing to this animation need how many frames -1 : use the value from CCMovementData get from flash design panel
- {Number} durationTween
- he frame count you want to play in the game.if _durationTween is 80, then the animation will played 80 frames in a loop -1 : use the value from CCMovementData get from flash design panel
- {Number} loop
- Whether the animation is loop. loop < 0 : use the value from CCMovementData get from flash design panel loop = 0 : this animation is not loop loop > 0 : this animation is loop
- {Number} tweenEasing
- CCTween easing is used for calculate easing effect TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel -1 : fade out 0 : line 1 : fade in 2 : fade in and out
-
setAnimation(animation)animation setter
- 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
- limit
-
{ccs.FrameData} tweenNodeTo(percent, node)According to the percent to calculate current CCFrameData with tween effect
- Parameters:
- {Number} percent
- {ccs.FrameData} node
- Returns:
- {ccs.FrameData}
-
{Number} updateFrameData(currentPercent, activeFrame)Calculate which frame arrived, and if current frame have event, then call the event listener
- Parameters:
- {Number} currentPercent
- {Boolean} activeFrame
- Returns:
- {Number}
-
updateHandler()update will call this handler, you can handle your logic here