change TransitionTurnOffTiles::_outSceneProxy when class construction instead of onEnter

This commit is contained in:
Huabing.Xu 2013-12-19 21:49:21 +08:00
parent 034e1152e5
commit 517fec4de7
1 changed files with 4 additions and 4 deletions

View File

@ -1346,8 +1346,10 @@ void TransitionCrossFade::onExit()
// TurnOffTilesTransition // TurnOffTilesTransition
// //
TransitionTurnOffTiles::TransitionTurnOffTiles() TransitionTurnOffTiles::TransitionTurnOffTiles()
: _outSceneProxy(nullptr)
{ {
_outSceneProxy = nullptr; _outSceneProxy = NodeGrid::create();
_outSceneProxy->retain();
} }
TransitionTurnOffTiles::~TransitionTurnOffTiles() TransitionTurnOffTiles::~TransitionTurnOffTiles()
@ -1376,9 +1378,6 @@ void TransitionTurnOffTiles::sceneOrder()
void TransitionTurnOffTiles::onEnter() void TransitionTurnOffTiles::onEnter()
{ {
TransitionScene::onEnter(); TransitionScene::onEnter();
_outSceneProxy = NodeGrid::create();
_outSceneProxy->retain();
_outSceneProxy->setTarget(_outScene); _outSceneProxy->setTarget(_outScene);
_outSceneProxy->onEnter(); _outSceneProxy->onEnter();
@ -1403,6 +1402,7 @@ void TransitionTurnOffTiles::onEnter()
void TransitionTurnOffTiles::onExit() void TransitionTurnOffTiles::onExit()
{ {
_outSceneProxy->setTarget(nullptr);
_outSceneProxy->onExit(); _outSceneProxy->onExit();
TransitionScene::onExit(); TransitionScene::onExit();
} }