2011-01-22 17:30:00 +08:00
|
|
|
#ifndef __HELLOWORLD_SCENE_H__
|
|
|
|
#define __HELLOWORLD_SCENE_H__
|
2010-11-27 18:25:31 +08:00
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
class HelloWorld : public cocos2d::CCLayer
|
|
|
|
{
|
|
|
|
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
|
2011-03-07 17:11:57 +08:00
|
|
|
virtual void menuCloseCallback(CCObject* pSender);
|
2010-11-27 18:25:31 +08:00
|
|
|
|
|
|
|
// implement the "static node()" method manually
|
|
|
|
LAYER_NODE_FUNC(HelloWorld);
|
|
|
|
};
|
|
|
|
|
2011-01-22 17:30:00 +08:00
|
|
|
#endif // __HELLOWORLD_SCENE_H__
|