Class cc.Repeat

Class Summary
Constructor Attributes Constructor Name and Description
 
Repeats an action a number of times.

Method Summary

Class Detail

cc.Repeat()
Repeats an action a number of times. To repeat an action forever use the CCRepeatForever action.

Method Detail

  • {cc.Repeat} clone()
    returns a new clone of the action
    Returns:
    {cc.Repeat}
  • <static> {cc.Repeat} cc.Repeat.create(action, times)
    Creates a Repeat 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}
  • ctor(action, times)
    Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30) Constructor of cc.Repeat
    var rep = new cc.Repeat(cc.Sequence.create(jump2, jump1), 5);
    Parameters:
    {cc.FiniteTimeAction} action
    {Number} times
  • {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