Class cc.Repeat

Class Summary
Constructor Attributes Constructor Name and Description
 
cc.Repeat(action, times)
Repeats an action a number of times.

Method Summary

Class Detail

cc.Repeat(action, times)
Repeats an action a number of times. To repeat an action forever use the CCRepeatForever action.
var rep = new cc.Repeat(cc.sequence(jump2, jump1), 5);
Parameters:
{cc.FiniteTimeAction} action
{Number} times

Field Detail

<static> {cc.Repeat} cc.Repeat.create
Please use cc.repeat instead Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30)
Deprecated:
since v3.0
Please use cc.repeat instead.

Method Detail

  • {cc.Repeat} clone()
    returns a new clone of the action
    Returns:
    {cc.Repeat}
  • ctor(action, times)
    Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30).
    Parameters:
    {cc.FiniteTimeAction} action
    {Number} times
  • {cc.FiniteTimeAction} getInnerAction()
    Get inner Action.
    Returns:
    {cc.FiniteTimeAction}
  • {Boolean} initWithAction(action, times)
    Parameters:
    {cc.FiniteTimeAction} action
    {Number} times
    Returns:
    {Boolean}
  • {Boolean} isDone()
    Return true if the action has finished.
    Returns:
    {Boolean}
  • {cc.Repeat} reverse()
    returns a reversed action.
    Returns:
    {cc.Repeat}
  • setInnerAction(action)
    Set inner Action.
    Parameters:
    {cc.FiniteTimeAction} action
  • startWithTarget(target)
    Start the action with target.
    Parameters:
    {cc.Node} target
  • stop()
    stop the action
  • update(dt)
    Called once per frame. Time is the number of seconds of a frame interval.
    Parameters:
    {Number} dt