Class cc.RotateTo
- Defined in: CCActionInterval.js
- Extends cc.ActionInterval
Constructor Attributes | Constructor Name and Description |
---|---|
cc.RotateTo(duration, deltaAngleX, deltaAngleY)
Rotates a cc.Node object to a certain angle by modifying it's.
|
Method Summary
Class Detail
cc.RotateTo(duration, deltaAngleX, deltaAngleY)
Rotates a cc.Node object to a certain angle by modifying it's.
rotation attribute.
The direction will be decided by the shortest angle.
The direction will be decided by the shortest angle.
var rotateTo = new cc.RotateTo(2, 61.0);
- Parameters:
- {Number} duration
- duration in seconds
- {Number} deltaAngleX
- deltaAngleX in degrees.
- {Number} deltaAngleY Optional
- deltaAngleY in degrees.
Field Detail
Please use cc.rotateTo instead
Creates a RotateTo action with separate rotation angles.
To specify the angle of rotation.
- Deprecated:
-
since v3.0
Please use cc.rotateTo instead.
Method Detail
-
{cc.RotateTo} clone()returns a new clone of the action
- Returns:
- {cc.RotateTo}
-
ctor(duration, deltaAngleX, deltaAngleY)Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
Creates a RotateTo action with x and y rotation angles.- Parameters:
- {Number} duration
- duration in seconds
- {Number} deltaAngleX
- deltaAngleX in degrees.
- {Number} deltaAngleY Optional
- deltaAngleY in degrees.
-
{Boolean} initWithDuration(duration, deltaAngleX, deltaAngleY)Initializes the action.
- Parameters:
- {Number} duration
- {Number} deltaAngleX
- {Number} deltaAngleY
- Returns:
- {Boolean}
-
reverse()RotateTo reverse not implemented. Will be overridden.
-
startWithTarget(target)Start the action with target.
- Parameters:
- {cc.Node} target
-
update(dt)Called once per frame. Time is the number of seconds of a frame interval.
- Parameters:
- {Number} dt