cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCLayerMultiplex Class Reference

#import <CCLayer.h>

+ Inheritance diagram for CCLayerMultiplex:
+ Collaboration diagram for CCLayerMultiplex:

List of all members.

Public Member Functions

(id) - initWithArray:
(id) - initWithLayers:vaList:
(void) - switchTo:
(void) - switchToAndReleaseMe:

Static Public Member Functions

(id) + layerWithArray:
(id) + layerWithLayers:

Protected Attributes

NSMutableArray * _layers

Properties

unsigned int _enabledLayer

Detailed Description

CCLayerMultiplex is a CCLayer with the ability to multiplex its children. Features:

  • It supports one or more children
  • Only one children will be active a time

Member Function Documentation

- (id) initWithArray: (NSArray *)  arrayOfLayers

initializes a CCMultiplexLayer with an array of layers

Since:
v2.1
- (id) initWithLayers: (CCLayer *)  layer
vaList: (va_list)  params 

initializes a MultiplexLayer with one or more layers using a variable argument list.

+ (id) layerWithArray: (NSArray *)  arrayOfLayers

creates a CCMultiplexLayer with an array of layers.

Since:
v2.1
+ (id) layerWithLayers: (CCLayer *)  layer
,   NS_REQUIRES_NIL_TERMINATION 

creates a CCMultiplexLayer with one or more layers using a variable argument list.

- (void) switchTo: (unsigned int)  n

switches to a certain layer indexed by n. The current (old) layer will be removed from its parent with 'cleanup:YES'.

- (void) switchToAndReleaseMe: (unsigned int)  n

release the current layer and switches to another layer indexed by n. The current (old) layer will be removed from its parent with 'cleanup:YES'.


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