-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainScene.h
35 lines (30 loc) · 1.12 KB
/
MainScene.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __MAIN_SCENE_H__
#define __MAIN_SCENE_H__
#include "cocos2d.h"
class MainScene : public cocos2d::CCLayerColor
{
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene();
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();
// a selector callback
void menuCloseCallback(cocos2d::Ref* pSender);
void menuReadingCallback(cocos2d::Ref* pSender);
void menuListCallback(cocos2d::Ref* pSender);
void menuSearchCallback(cocos2d::Ref* pSender);
void menuSettingCallback(cocos2d::Ref* pSender);
void menuNULLCallback(cocos2d::Ref* pSender);
void SearchBookCallback(cocos2d::Ref* pSender);
// implement the "static create()" method manually
CREATE_FUNC(MainScene);
private:
cocos2d::Sprite * isprite;
cocos2d::CCLayerGradient* searchlayer;
cocos2d::CCLayerGradient* settinglayer;
cocos2d::CCLayerGradient* readinglayer;
cocos2d::CCLayerGradient* listlayer;
//state 1:reading,2:list,3:search,4:setting
int state;
};
#endif // __HELLOWORLD_SCENE_H__