Public Member Functions | Properties

CCLayer Class Reference

#import <CCLayer.h>

Inherits CCNode, CCStandardTouchDelegate-p, and CCTargetedTouchDelegate-p.

Inherited by CCColorLayer, CCMenu, and CCMultiplexLayer.

Collaboration diagram for CCLayer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(void) - registerWithTouchDispatcher

Properties

BOOL isTouchEnabled
BOOL isAccelerometerEnabled

Detailed Description

CCLayer is a subclass of CCNode that implements the TouchEventsDelegate protocol.

All features from CCNode are valid, plus the following new features:

Definition at line 43 of file CCLayer.h.


Member Function Documentation

- (void) registerWithTouchDispatcher  

If isTouchEnabled, this method is called onEnter. Override it to change the way CCLayer receives touch events. ( Default: [[TouchDispatcher sharedDispatcher] addStandardDelegate:self priority:0] ) Example: -(void) registerWithTouchDispatcher { [[TouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:INT_MIN+1 swallowsTouches:YES]; }

Since:
v0.8.0

Property Documentation

- (BOOL) isAccelerometerEnabled [read, write, assign]

whether or not it will receive Accelerometer events You can enable / disable accelerometer events with this property.

Since:
v0.8.1

Definition at line 47 of file CCLayer.h.

- (BOOL) isTouchEnabled [read, write, assign]

whether or not it will receive Touch events. You can enable / disable touch events with this property. Only the touches of this node will be affected. This "method" is not propagated to it's children.

Since:
v0.8.1

Definition at line 46 of file CCLayer.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

cocos2d for iPhone 0.99.4 API Reference - Generated using Doxygen 1.7.1