#import <CC3Actions.h>
Instance Methods | |
(CCActionInterval *) | - asActionLimitedFrom:to: |
(id) | - initWithDuration: |
(id) | - initWithDuration:onTrack: |
Class Methods | |
(id) | + actionWithDuration: |
(id) | + actionWithDuration:limitFrom:to: |
(id) | + actionWithDuration:onTrack: |
(id) | + actionWithDuration:onTrack:limitFrom:to: |
Properties | |
BOOL | isReversed |
GLuint | trackID |
CC3ActionAnimate animates a single track of animation on a CC3Node and its descendants.
To animate a node, CC3ActionAnimate invokes the establishAnimationFrameAt:onTrack: method of the target CC3Node. The heavy lifting is performed by the CC3NodeAnimation instance held in the animation property of the node.
The establishAnimationFrameAt:onTrack: method of the CC3Node also takes care of propagating the animation to its descendant nodes. A complete assembly of nodes can therefore be animated in concert for one track of information using a single CC3ActionAnimate instance.
It is possible to animate only a fraction of the full animation. This can be done using either the actionWithDuration:onTrack:limitFrom:to: or asActionLimitedFrom:to: methods.
Doing so will result is an animation action that will perform only part of the animation. This is very useful for an node that contains several different motions in one animation. Using a range-limited CC3ActionAnimate, you can animate one of those distinct motions without having to run the full animation. To do this, set the startOfRange and endOfRange values to the fractional positions (between zero and one) of the start and end frames of the sub-animation.
For example, if a character animation contains a punch animation that starts and stops at relative positions 0.67 and 0.78 respectively within the full animation, setting those two values here will result in an animation containing only the punch.
+ (id) actionWithDuration: | (CCTime) | t |
Allocates and initializes an autoreleased instance to animate animation track zero on the target node, over the specified time duration.
+ (id) actionWithDuration: | (CCTime) | t | |
limitFrom: | (GLfloat) | startOfRange | |
to: | (GLfloat) | endOfRange | |
Allocates and initializes an autoreleased instance to animate animation track zero on the target node, over the specified time duration, then wraps that instance in an autoreleased CC3ActionRangeLimit instance that maps the normal zero-to-one update range to the specified range, and returns the CC3ActionRangeLimit instance.
The effective result is an animation action that will perform only part of the animation. This is very useful for a node that contains several different motions in one animation. Using a range-limited CC3ActionAnimate, you can animate one of those distinct motions without having to run the full animation. To do this, set the startOfRange and endOfRange values to the fractional positions (between zero and one) of the start and end frames of the sub-animation.
For example, if a character animation contains a punch animation that starts and stops at relative positions 0.67 and 0.78 respectively within the full animation, setting those two values here will result in an animation containing only the punch.
+ (id) actionWithDuration: | (CCTime) | t | |
onTrack: | (GLuint) | trackID | |
Allocates and initializes an autoreleased instance to animate the specified animation track on the target node, over the specified time duration.
+ (id) actionWithDuration: | (CCTime) | t | |
onTrack: | (GLuint) | trackID | |
limitFrom: | (GLfloat) | startOfRange | |
to: | (GLfloat) | endOfRange | |
Allocates and initializes an autoreleased instance to animate the specified animation track on the target node, over the specified time duration, then wraps that instance in an autoreleased CC3ActionRangeLimit instance that maps the normal zero-to-one update range to the specified range, and returns the CC3ActionRangeLimit instance.
The effective result is an animation action that will perform only part of the animation. This is very useful for a node that contains several different motions in one animation. Using a range-limited CC3ActionAnimate, you can animate one of those distinct motions without having to run the full animation. To do this, set the startOfRange and endOfRange values to the fractional positions (between zero and one) of the start and end frames of the sub-animation.
For example, if a character animation contains a punch animation that starts and stops at relative positions 0.67 and 0.78 respectively within the full animation, setting those two values here will result in an animation containing only the punch.
- (CCActionInterval*) asActionLimitedFrom: | (GLfloat) | startOfRange | |
to: | (GLfloat) | endOfRange | |
Wraps this instance in an autoreleased CC3ActionRangeLimit instance that maps the normal zero-to-one update range to the specified range, and returns the CC3ActionRangeLimit instance.
The effective result is an animation action that will perform only part of the animation. This is very useful for an node that contains several different motions in one animation. Using a range-limited CC3ActionAnimate, you can animate one of those distinct motions without having to run the full animation. To do this, set the startOfRange and endOfRange values of the fractional positions (between zero and one) of the start and end frames of the sub-animation.
For example, if a character animation contains a punch animation that starts and stops at relative positions 0.67 and 0.78 respectively within the full animation, setting those two values here will result in an animation containing only the punch.
- (id) initWithDuration: | (CCTime) | t |
Initializes this instance to animate animation track zero on the target node, over the specified time duration.
- (id) initWithDuration: | (CCTime) | t | |
onTrack: | (GLuint) | trackID | |
Initializes this instance to animate the specified animation track on the target node, over the specified time duration.
|
readwritenonatomicassign |
Indicates whether this action is running in reverse.
Setting this to YES will cause the animation to run in reverse.
Generally, this is set when creating a reverse action using the reverse method of a normal CCActionInterval instance to create its compliment. The application will generally not set this property directly.
|
readnonatomicassign |
The animation track on which the animation runs.