CCActionMoveTo Class Reference
Inherits from | CCActionMoveBy : CCActionInterval : CCActionFiniteTime : CCAction : NSObject |
---|---|
Declared in | CCActionInterval.h |
Overview
This action moves the target to the position specified, these are absolute coordinates. Several CCMoveTo actions can be concurrently called, and the resulting movement will be the sum of individual movements.
Warning: Move actions shouldn’t be used to move nodes with a dynamic CCPhysicsBody as both the physics body and the action will alter the node’s position property, overriding each other’s changes. This leads to unpredictable behavior.
Creating a Move Action
+ actionWithDuration:position:
Creates the action.
+ (id)actionWithDuration:(CCTime)duration position:(CGPoint)position
Parameters
duration |
Action interval. |
---|---|
position |
Absolute position to move to. |
Return Value
New moveto action.
Declared In
CCActionInterval.h
– initWithDuration:position:
Initializes the action.
- (id)initWithDuration:(CCTime)duration position:(CGPoint)position
Parameters
duration |
Action interval. |
---|---|
position |
Absolute position to move to. |
Return Value
New moveto action.
Declared In
CCActionInterval.h