Class cc.Repeat
Extends
cc.ActionInterval.
Defined in: CCActionInterval.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Repeats an action a number of times.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
cc.Repeat.create(action, times)
creates a CCRepeat action.
|
initWithAction(action, times)
|
|
isDone()
|
|
reverse()
|
|
setInnerAction(action)
|
|
startWithTarget(target)
|
|
stop()
stop the action
|
|
update(time)
|
- Methods borrowed from class cc.ActionInterval:
- getAmplitudeRate, getElapsed, initWithDuration, setAmplitudeRate, step
- Methods borrowed from class cc.FiniteTimeAction:
- getDuration, setDuration
- Methods borrowed from class cc.Action:
- copy, copyWithZone, description, getOriginalTarget, getTag, getTarget, release, retain, setOriginalTarget, setTag, setTarget
Class Detail
cc.Repeat()
Repeats an action a number of times.
To repeat an action forever use the CCRepeatForever action.
Method Detail
<static>
{cc.Repeat}
cc.Repeat.create(action, times)
creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30)
// example var rep = cc.Repeat.create(cc.Sequence.create(jump2, jump1), 5);
- Parameters:
- {cc.FiniteTimeAction} action
- {Number} times
- Returns:
- {cc.Repeat}
{cc.FiniteTimeAction}
getInnerAction()
- Returns:
- {cc.FiniteTimeAction}
{Boolean}
initWithAction(action, times)
- Parameters:
- {cc.FiniteTimeAction} action
- {Number} times
- Returns:
- {Boolean}
{Boolean}
isDone()
- Returns:
- {Boolean}
{cc.ActionInterval}
reverse()
- Returns:
- {cc.ActionInterval}
setInnerAction(action)
- Parameters:
- {cc.FiniteTimeAction} action
startWithTarget(target)
- Parameters:
- {cc.Node} target
stop()
stop the action
update(time)
- Parameters:
- {Number} time
- time in seconds