Class cc.RepeatForever

Class Summary
Constructor Attributes Constructor Name and Description
 
Repeats an action for ever.

Method Summary

Class Detail

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

Field Detail

<static> {cc.RepeatForever} cc.RepeatForever.create
Please use cc.repeatForever instead Create a acton which repeat forever
var action = new cc.Spawn(cc.jumpBy(2, cc.p(300, 0), 50, 4), cc.rotateBy(2, 720));
Deprecated:
since v3.0
Please use cc.repeatForever instead.

Method Detail

  • {cc.RepeatForever} clone()
    returns a new clone of the action
    Returns:
    {cc.RepeatForever}
  • ctor(action)
    Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    Create a acton which repeat forever.
    Parameters:
    {cc.FiniteTimeAction} action
  • {cc.ActionInterval} getInnerAction()
    Get inner action.
    Returns:
    {cc.ActionInterval}
  • {Boolean} initWithAction(action)
    Parameters:
    {cc.ActionInterval} action
    Returns:
    {Boolean}
  • {Boolean} isDone()
    Return true if the action has finished.
    Returns:
    {Boolean}
  • {cc.RepeatForever} reverse()
    Returns a reversed action.
    Returns:
    {cc.RepeatForever}
  • setInnerAction(action)
    Set inner action.
    Parameters:
    {cc.ActionInterval} action
  • startWithTarget(target)
    Start the action with target.
    Parameters:
    {cc.Node} target
  • step(dt)
    called every frame with it's delta time.
    DON'T override unless you know what you are doing.
    Parameters:
    dt
    delta time in seconds