CCActionRotateBy Class Reference
Inherits from | CCActionInterval : CCActionFiniteTime : CCAction : NSObject |
---|---|
Conforms to | NSCopying |
Declared in | CCActionInterval.h |
Overview
This action rotates the target clockwise by the number of degrees specified.
Warning: Rotate actions shouldn’t be used to rotate nodes with a dynamic CCPhysicsBody unless the body has allowsRotation set to NO. Otherwise both the physics body and the action will alter the node’s rotation property, overriding each other’s changes. This leads to unpredictable behavior.
Creating a Rotate Action
+ actionWithDuration:angle:
Creates the action.
+ (id)actionWithDuration:(CCTime)duration angle:(float)deltaAngle
Parameters
duration |
Action duration. |
---|---|
deltaAngle |
Delta angle in degrees. |
Return Value
New rotate action.
Declared In
CCActionInterval.h
– initWithDuration:angle:
Initializes the action.
- (id)initWithDuration:(CCTime)duration angle:(float)deltaAngle
Parameters
duration |
Action duration. |
---|---|
deltaAngle |
Delta angle in degrees. |
Return Value
New rotate action.
Declared In
CCActionInterval.h
+ actionWithDuration:angleX:angleY:
Creates the action with separate rotation angles.
+ (id)actionWithDuration:(CCTime)t angleX:(float)aX angleY:(float)aY
Parameters
t |
Action duration. |
---|---|
aX |
X rotation in degrees. |
aY |
Y rotation in degrees. |
Return Value
New rotate action.
Declared In
CCActionInterval.h
– initWithDuration:angleX:angleY:
Initializes the action with separate rotation angles.
- (id)initWithDuration:(CCTime)t angleX:(float)aX angleY:(float)aY
Parameters
t |
Action duration. |
---|---|
aX |
X rotation in degrees. |
aY |
Y rotation in degrees. |
Return Value
New rotate action.
Declared In
CCActionInterval.h