Class cc.MoveTo
- Defined in: CCActionInterval.js
- Extends cc.MoveBy
Constructor Attributes | Constructor Name and Description |
---|---|
cc.MoveTo(duration, position, y)
Moves a CCNode object to the position x,y.
|
Method Summary
Class Detail
cc.MoveTo(duration, position, y)
Moves a CCNode object to the position x,y. x and y are absolute coordinates by modifying it's position attribute.
Several CCMoveTo actions can be concurrently called, and the resulting
movement will be the sum of individual movements.
Several CCMoveTo actions can be concurrently called, and the resulting
movement will be the sum of individual movements.
var actionBy = new cc.MoveTo(2, cc.p(80, 80));
- Parameters:
- {Number} duration
- duration in seconds
- {cc.Point|Number} position
- {Number} y
Field Detail
Please use cc.moveTo instead.
Moving to the specified coordinates.
- Deprecated:
-
since v3.0
Please use cc.moveTo instead.
Method Detail
-
{cc.MoveTo} clone()returns a new clone of the action
- Returns:
- {cc.MoveTo}
-
ctor(duration, position, y)Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
- Parameters:
- {Number} duration
- duration in seconds
- {cc.Point|Number} position
- {Number} y
-
{Boolean} initWithDuration(duration, position, y)Initializes the action.
- Parameters:
- {Number} duration
- duration in seconds
- {cc.Point} position
- {Number} y
- Returns:
- {Boolean}
-
startWithTarget(target)Start the action with target.
- Parameters:
- {cc.Node} target