我有一个旧代码。我将它移植到新的 Cocos2d-x rc0 2.1.3 。它在以下几行中给了我错误:
1.在GameScene.cpp中
CCScene *scene = CCScene::node();
GameScene *layer = GameScene::node();
2.在GameScene.cpp中
userPaddle_->runAction(CCMoveTo::actionWithDuration(0.3 * diffX / gameArea_.size.width, destPosition));
3.在GameScene.cpp中
CCPoint location = touch->locationInView(touch->view());
4.在GameScene.cpp中
if (CCRect::CCRectContainsPoint(touchArea_, location))
5.在GameScene.cpp中
if (CCRect::CCRectIntersectsRect(ballRect, CC_SPRITE_RECT(paddle)))
6. 在 Appdelegate.cpp
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
7. 在 GameScene.h 中
// implement the "static node()" method manually
LAYER_NODE_FUNC(HelloWorld);