add overrode init method for LayerMultiplex

This commit is contained in:
psi 2013-08-26 20:38:23 +09:00
parent 954ba8755e
commit f0620b0e85
2 changed files with 11 additions and 0 deletions

View File

@ -1073,6 +1073,16 @@ void LayerMultiplex::addLayer(Layer* 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)
{
if (Layer::init())

View File

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