Inherits from CCLayer : CCNode : NSObject
Conforms to CCBlendProtocol
CCRGBAProtocol
Declared in CCLayer.h

Overview

CCColorLayer is a subclass of CCLayer that implements the CCRGBAProtocol protocol.

All features from CCLayer are valid, plus the following new features: – opacity – RGB colors

Tasks

Properties

blendFunc

BlendFunction. Conforms to CCBlendProtocol protocol

@property (nonatomic, readwrite) ccBlendFunc blendFunc

Declared In

CCLayer.h

color

Opacity: conforms to CCRGBAProtocol protocol

@property (nonatomic, readonly) ccColor3B color

Declared In

CCLayer.h

opacity

Opacity: conforms to CCRGBAProtocol protocol

@property (nonatomic, readonly) GLubyte opacity

Declared In

CCLayer.h

Class Methods

layerWithColor:

creates a CCLayer with color. Width and height are the window size.

+ (id)layerWithColor:(ccColor4B)color

Declared In

CCLayer.h

layerWithColor:width:height:

creates a CCLayer with color, width and height

+ (id)layerWithColor:(ccColor4B)color width:(GLfloat)w height:(GLfloat)h

Declared In

CCLayer.h

Instance Methods

changeHeight:

change height

- (void)changeHeight:(GLfloat)h

Declared In

CCLayer.h

changeWidth:

change width

- (void)changeWidth:(GLfloat)w

Declared In

CCLayer.h

changeWidth:height:

change width and height

- (void)changeWidth:(GLfloat)w height:(GLfloat)h

Availability

Declared In

CCLayer.h

initWithColor:

initializes a CCLayer with color. Width and height are the window size.

- (id)initWithColor:(ccColor4B)color

Declared In

CCLayer.h

initWithColor:width:height:

initializes a CCLayer with color, width and height

- (id)initWithColor:(ccColor4B)color width:(GLfloat)w height:(GLfloat)h

Declared In

CCLayer.h