v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CC3ActionMoveDirectionallyBy Class Reference

#import <CC3Actions.h>

Inheritance diagram for CC3ActionMoveDirectionallyBy:
Inheritance graph
[legend]

Instance Methods

(id) - initWithDuration:moveBy:
 

Class Methods

(id) + actionWithDuration:moveBy:
 

Properties

CC3Vector targetDirection
 

Detailed Description

CC3ActionMoveDirectionallyBy is an abstract subclass of CCActionInterval that is the parent of subclasses that move a target CC3Node by a specific translation distance in a direction relative to the orientation of the node.

The direction of movement is evaluated on each update frame. If the node is also being rotated over time, this action will follow the change in orientation of the node, and adjust the direction of movement.

This is an abstract class. Subclasses define the actual direction of movement by overriding the targetDirection property.

Method Documentation

+ (id) actionWithDuration: (CCTime)  t
moveBy: (GLfloat)  aDistance 

Allocates and initializes an autoreleased instance to move the target node by the specified distance in the direction, as indicated by the subclass, within the specified time duration.

The specified distance may be positive or negative, indicating whether the node should move forward or backward, relative to the direction of movement.

The direction of movement is evaluated on each update frame. If the node is also being rotated over time, this action will follow the change in direction of movement of the node.

- (id) initWithDuration: (CCTime)  t
moveBy: (GLfloat)  aDistance 

Initializes this instance to move the target node by the specified distance in the direction, as indicated by the subclass, within the specified time duration.

The specified distance may be positive or negative, indicating whether the node should move forward or backward, relative to the direction of movement.

The direction of movement is evaluated on each update frame. If the node is also being rotated over time, this action will follow the change in direction of movement of the node.

Property Documentation

- (CC3Vector) targetDirection
readnonatomicassign

The direction of movement.

This property is accessed on each update frame to determine the current direction of movement. If the node is also being rotated while this action is active, this direction will be different for each frame.

The abstract implementation simply returns kCC3VectorZero. Subclasses will override this property to return the current direction of movement.


The documentation for this class was generated from the following file: