mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4577 from dabingnn/develop_transitionScene
Develop transition scene
This commit is contained in:
commit
b151a657af
|
@ -36,6 +36,7 @@ THE SOFTWARE.
|
|||
#include "CCLayer.h"
|
||||
#include "CCRenderTexture.h"
|
||||
#include "CCNodeGrid.h"
|
||||
#include "CCNewRenderTexture.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -1273,7 +1274,7 @@ void TransitionCrossFade::onEnter()
|
|||
LayerColor* layer = LayerColor::create(color);
|
||||
|
||||
// create the first render texture for inScene
|
||||
RenderTexture* inTexture = RenderTexture::create((int)size.width, (int)size.height);
|
||||
RenderTexture* inTexture = NewRenderTexture::create((int)size.width, (int)size.height);
|
||||
|
||||
if (nullptr == inTexture)
|
||||
{
|
||||
|
@ -1290,7 +1291,7 @@ void TransitionCrossFade::onEnter()
|
|||
inTexture->end();
|
||||
|
||||
// create the second render texture for outScene
|
||||
RenderTexture* outTexture = RenderTexture::create((int)size.width, (int)size.height);
|
||||
RenderTexture* outTexture = NewRenderTexture::create((int)size.width, (int)size.height);
|
||||
outTexture->getSprite()->setAnchorPoint( Point(0.5f,0.5f) );
|
||||
outTexture->setPosition( Point(size.width/2, size.height/2) );
|
||||
outTexture->setAnchorPoint( Point(0.5f,0.5f) );
|
||||
|
|
Loading…
Reference in New Issue