ActionInstant Class
Extends FiniteTimeAction
Module: cc
Instant actions are immediate actions. They don't have a duration like the ActionInterval actions.
Index
Methods
getDurationget duration of the action.setDurationset duration of the action.reverseReturns a reversed action.cloneto copy object with deep copy.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
getDuration
get duration of the action. (seconds).
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/actions/CCAction.js:205 |
setDuration
set duration of the action. (seconds).
| meta | description |
|---|---|
| Defined in | cocos2d/actions/CCAction.js:215 |
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 | cocos2d/actions/CCAction.js:225 |
clone
to copy object with deep copy. returns a clone of action.
| meta | description |
|---|---|
| Returns | FiniteTimeAction |
| Defined in | cocos2d/actions/CCAction.js:241 |
isDone
return true if the action has finished.
| meta | description |
|---|---|
| Returns | Boolean |
| Defined in | cocos2d/actions/CCAction.js:70 |
getTarget
get the target.
| meta | description |
|---|---|
| Returns | Node |
| Defined in | cocos2d/actions/CCAction.js:102 |
setTarget
The action will modify the target properties.
| meta | description |
|---|---|
| Defined in | cocos2d/actions/CCAction.js:112 |
Parameters
targetNode
getOriginalTarget
get the original target.
| meta | description |
|---|---|
| Returns | Node |
| Defined in | cocos2d/actions/CCAction.js:122 |
getTag
get tag number.
| meta | description |
|---|---|
| Returns | Number |
| Defined in | cocos2d/actions/CCAction.js:139 |
setTag
set tag number.
| meta | description |
|---|---|
| Defined in | cocos2d/actions/CCAction.js:149 |
Parameters
tagNumber