cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.koboldtouch.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
CCFollow Class Reference

#import <CCAction.h>

Inheritance diagram for CCFollow:
Collaboration diagram for CCFollow:

Instance Methods

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

Class Methods

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

Protected Attributes

CCNode_followedNode
 
BOOL _boundarySet
 
BOOL _boundaryFullyCovered
 
CGPoint _halfScreenSize
 
CGPoint _fullScreenSize
 
float _leftBoundary
 
float _rightBoundary
 
float _topBoundary
 
float _bottomBoundary
 
 Protected Attributes inherited from CCAction
id _originalTarget
 
id _target
 
NSInteger _tag
 

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

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


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