Merge pull request #3484 from ledyba/develop

Override LayerMultiplex::init()
This commit is contained in:
minggo 2013-08-27 19:08:39 -07:00
commit 48444c864c
2 changed files with 14 additions and 0 deletions

View File

@ -1073,6 +1073,19 @@ void LayerMultiplex::addLayer(Layer* layer)
_layers->addObject(layer); _layers->addObject(layer);
} }
bool LayerMultiplex::init()
{
if (Layer::init())
{
_layers = Array::create();
_layers->retain();
_enabledLayer = 0;
return true;
}
return false;
}
bool LayerMultiplex::initWithLayers(Layer *layer, va_list params) bool LayerMultiplex::initWithLayers(Layer *layer, va_list params)
{ {
if (Layer::init()) if (Layer::init())

View File

@ -374,6 +374,7 @@ public:
LayerMultiplex(); LayerMultiplex();
virtual ~LayerMultiplex(); virtual ~LayerMultiplex();
virtual bool init();
/** initializes a MultiplexLayer with one or more layers using a variable argument list. */ /** initializes a MultiplexLayer with one or more layers using a variable argument list. */
bool initWithLayers(Layer* layer, va_list params); bool initWithLayers(Layer* layer, va_list params);