2013-02-19 15:38:30 +08:00
|
|
|
#ifndef __HELLOWORLD_SCENE_H__
|
|
|
|
#define __HELLOWORLD_SCENE_H__
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
2013-06-20 22:18:43 +08:00
|
|
|
class HelloWorld : public cocos2d::Layer
|
2013-02-19 15:38:30 +08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-19 07:50:26 +08:00
|
|
|
// there's no 'id' in cpp, so we recommend returning the class instance pointer
|
|
|
|
static cocos2d::Scene* createScene();
|
|
|
|
|
2013-02-19 15:38:30 +08:00
|
|
|
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
|
|
|
|
virtual bool init();
|
|
|
|
|
|
|
|
// a selector callback
|
2013-06-20 22:18:43 +08:00
|
|
|
void menuCloseCallback(Object* pSender);
|
2013-02-19 15:38:30 +08:00
|
|
|
|
2013-09-19 07:50:26 +08:00
|
|
|
// implement the "static create()" method manually
|
2013-02-19 15:38:30 +08:00
|
|
|
CREATE_FUNC(HelloWorld);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __HELLOWORLD_SCENE_H__
|