mirror of https://github.com/axmolengine/axmol.git
add overrode init method for LayerMultiplex
This commit is contained in:
parent
954ba8755e
commit
f0620b0e85
|
@ -1073,6 +1073,16 @@ 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())
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue