Class cc.MoveBy

Class Summary
Constructor Attributes Constructor Name and Description
 

Moves a CCNode object x,y pixels by modifying it's position attribute.

Method Summary

Class Detail

cc.MoveBy()

Moves a CCNode object x,y pixels by modifying it's position attribute.
x and y are relative to the position of the object.
Several CCMoveBy actions can be concurrently called, and the resulting
movement will be the sum of individual movements.

Method Detail

  • {cc.MoveBy} clone()
    returns a new clone of the action
    Returns:
    {cc.MoveBy}
  • <static> {cc.MoveBy} cc.MoveBy.create(duration, deltaPosition)
    // example
    var actionTo = cc.MoveBy.create(2, cc.p(windowSize.width - 40, windowSize.height - 40));
    Parameters:
    {Number} duration
    duration in seconds
    {cc.Point} deltaPosition
    Returns:
    {cc.MoveBy}
  • {Boolean} initWithDuration(duration, position)
    Parameters:
    {Number} duration
    duration in seconds
    {cc.Point} position
    Returns:
    {Boolean}
  • reverse()
    MoveTo reverse is not implemented
  • startWithTarget(target)
    Parameters:
    {Number} target
  • update(time)
    Parameters:
    {Number} time
    time in seconds