From 517fec4de733b8457c93119b5154b939f8f2910d Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Thu, 19 Dec 2013 21:49:21 +0800 Subject: [PATCH] change TransitionTurnOffTiles::_outSceneProxy when class construction instead of onEnter --- cocos/2d/CCTransition.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index cede266d2e..e9ca73f3df 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -1346,8 +1346,10 @@ void TransitionCrossFade::onExit() // TurnOffTilesTransition // TransitionTurnOffTiles::TransitionTurnOffTiles() +: _outSceneProxy(nullptr) { - _outSceneProxy = nullptr; + _outSceneProxy = NodeGrid::create(); + _outSceneProxy->retain(); } TransitionTurnOffTiles::~TransitionTurnOffTiles() @@ -1376,9 +1378,6 @@ void TransitionTurnOffTiles::sceneOrder() void TransitionTurnOffTiles::onEnter() { TransitionScene::onEnter(); - - _outSceneProxy = NodeGrid::create(); - _outSceneProxy->retain(); _outSceneProxy->setTarget(_outScene); _outSceneProxy->onEnter(); @@ -1403,6 +1402,7 @@ void TransitionTurnOffTiles::onEnter() void TransitionTurnOffTiles::onExit() { + _outSceneProxy->setTarget(nullptr); _outSceneProxy->onExit(); TransitionScene::onExit(); }