EaseElastic Class
Extends ActionEase
Module: cc
Ease Elastic abstract class.
Index
Methods
easingImplementation of ease motion.repeatRepeats an action a number of times. To repeat an action forever use the CCRepeatForever action.repeatForeverRepeats an action for ever.
To repeat the an action for a limited number of times use the Repeat action.getDurationget duration of the action. (seconds).setDurationset duration of the action. (seconds).reverseReturns a reversed action.
For example:- The action will be x coordinates of 0 move to 100.
- The reversed action will be x of 100 move to 0.
- Will be rewritten
- The action will be x coordinates of 0 move to 100.
cloneto copy object with deep copy. returns a clone of action.isDonereturn true if the action has finished.getTargetget the target.setTargetThe action will modify the target properties.getOriginalTargetget the original target.getTagget tag number.setTagset tag number.
Details
Methods
easing
Implementation of ease motion.
| meta | description |
|---|---|
| Returns | ActionInterval |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCActionInterval.js:124 |
Parameters
easeObjObject
Examples
action.easing(cc.easeIn(3.0));
repeat
Repeats an action a number of times. To repeat an action forever use the CCRepeatForever action.
| meta | description |
|---|---|
| Returns | ActionInterval |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCActionInterval.js:252 |
Parameters
timesNumber
repeatForever
Repeats an action for ever.
To repeat the an action for a limited number of times use the Repeat action.
| meta | description |
|---|---|
| Returns | ActionInterval |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCActionInterval.js:272 |
getDuration
get duration of the action. (seconds).
| meta | description |
|---|---|
| Returns | Number |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:200 |
setDuration
set duration of the action. (seconds).
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:210 |
Parameters
durationNumber
reverse
Returns a reversed action.
For example:
- The action will be x coordinates of 0 move to 100.
- The reversed action will be x of 100 move to 0.
- Will be rewritten
| meta | description |
|---|---|
| Returns | Null |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:220 |
clone
to copy object with deep copy. returns a clone of action.
| meta | description |
|---|---|
| Returns | FiniteTimeAction |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:236 |
isDone
return true if the action has finished.
| meta | description |
|---|---|
| Returns | Boolean |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:65 |
getTarget
get the target.
| meta | description |
|---|---|
| Returns | Node |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:97 |
setTarget
The action will modify the target properties.
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:107 |
Parameters
targetNode
getOriginalTarget
get the original target.
| meta | description |
|---|---|
| Returns | Node |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:117 |
getTag
get tag number.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:134 |
setTag
set tag number.
| meta | description |
|---|---|
| Defined in | https:/github.com/cocos-creator/engine/blob/master/cocos2d/actions/CCAction.js:144 |
Parameters
tagNumber