class HelloWorld : public cocos2d::CCLayerColor
{
public:
// Here’s a difference. Method ‘init’ in cocos2d-x returns bool, instead of returning ‘id’ in cocos2d-iphone
virtual bool init();
// there’s no ‘id’ in cpp, so we recommand to return the exactly class pointer
static cocos2d::CCScene* scene();
// a selector callback
virtual void menuCloseCallback(CCObject* pSender);
// implement the “static node()” method manually
LAYER_NODE_FUNC(HelloWorld);
virtual void addTarget();
virtual void spriteMoveFinished(CCNode* sender);
virtual void gameLogic(ccTime dt);
};
#endif // HELLOWORLD_SCENE_H
so i was thinking how to declare the gameLogic correctly ?
Hi all , Now I’m Developing a game that will need camera phone feature for taking picture and set it as a background on android ,
any advice how can I do that with cocos2d-x ?
thanks for the reply Minggo ,
the picture will used as a background of the game ,
so after i get camera phone feature through jni can I still ported the application from android to iOS (including the camera feature) ?