FiniteTimeAction Class

Extends Action

Module: cc

Base class actions that do have a finite time duration.
Possible actions:

  • An action with a duration of 0 seconds.
  • An action with a duration of 35.5 seconds.

Infinite time actions are valid

Index

Methods
  • getDuration get duration of the action. (seconds).
  • setDuration set duration of the action. (seconds).
  • 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
  • clone to copy object with deep copy. returns a clone of action.
  • isDone return true if the action has finished.
  • getTarget get the target.
  • setTarget The action will modify the target properties.
  • getOriginalTarget get the original target.
  • getTag get tag number.
  • setTag set tag number.

Details

Methods

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

results matching ""

    No results matching ""