mirror of https://github.com/axmolengine/axmol.git
restore CCLayer:onExit()
This commit is contained in:
parent
36908396d2
commit
1a162a09ad
|
@ -257,7 +257,10 @@ void CCLayer::onEnter()
|
|||
void CCLayer::onExit()
|
||||
{
|
||||
CCDirector* pDirector = CCDirector::sharedDirector();
|
||||
pDirector->getTouchDispatcher()->removeDelegate(this);
|
||||
if( m_bIsTouchEnabled )
|
||||
{
|
||||
pDirector->getTouchDispatcher()->removeDelegate(this);
|
||||
}
|
||||
|
||||
// remove this layer from the delegates who concern Accelerometer Sensor
|
||||
if (m_bIsAccelerometerEnabled)
|
||||
|
|
Loading…
Reference in New Issue