cocos2d for iPhone  2.1.0
2D game engine for iOS and OS X
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Instance Methods | Class Methods | Properties | List of all members
CCFollow Class Reference

#import <CCAction.h>

Inheritance diagram for CCFollow:
Inheritance graph
[legend]
Collaboration diagram for CCFollow:
Collaboration graph
[legend]

Instance Methods

(id) - initWithTarget:
 
(id) - initWithTarget:worldBoundary:
 
- Instance Methods inherited from CCAction
(id) - init
 
(BOOL) - isDone
 return YES if the action has finished
 
(void) - startWithTarget:
 called before the action start. It will also set the target.
 
(void) - stop
 
(void) - step:
 called every frame with its delta time. DON'T override unless you know what you are doing.
 
(void) - update:
 

Class Methods

(id) + actionWithTarget:
 
(id) + actionWithTarget:worldBoundary:
 
- Class Methods inherited from CCAction
(id) + action
 

Properties

BOOL boundarySet
 
- Properties inherited from CCAction
id target
 
id originalTarget
 
NSInteger tag
 

Detailed Description

CCFollow is an action that "follows" a node.

Eg: [layer runAction: [CCFollow actionWithTarget:hero]];

Instead of using CCCamera as a "follower", use this action instead.

Since
v0.99.2

Definition at line 161 of file CCAction.h.

Method Documentation

+ (id) actionWithTarget: (CCNode *)  followedNode

creates the action with no boundary set

+ (id) actionWithTarget: (CCNode *)  followedNode
worldBoundary: (CGRect)  rect 

creates the action with a set boundary

- (id) initWithTarget: (CCNode *)  followedNode

initializes the action

- (id) initWithTarget: (CCNode *)  followedNode
worldBoundary: (CGRect)  rect 

initializes the action with a set boundary

Property Documentation

- (BOOL) boundarySet
readwritenonatomicassign

alter behavior - turn on/off boundary

Definition at line 185 of file CCAction.h.


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