문제

I have to convert my game into new version of cocos2dx.

I have finished to conversion but got deprecated the followings.

 COCOS2DX-2.X                            COCOS2DX-3.X

 sharedDirector()->getWinSize()              -> ?

 SpriteFrameCache::sharedSpriteFrameCache()  -> ?

  glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, 0, glVertices);

 kCCVertexAttrib_Position                    -> ?

Can any one assist me to convert?

Thanks in advance.

도움이 되었습니까?

해결책

Here the solutions

 Size screenSize =  Director::getInstance()->getWinSize();   - No need sharedDirector()

 SpriteFrameCache::getInstance()->addSpriteFramesWithFile("example.plist"); - No need sharedSpriteFrameCache
 glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, 0, vertices);   - No need kCCVertexAttrib_Position

This will help for your conversion.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top