/
HelloWorldScene.h
38 lines (25 loc) · 961 Bytes
/
HelloWorldScene.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
36
37
38
#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include "cocos2d.h"
class HelloWorld : public cocos2d::Layer
{
public:
cocos2d::Sprite *sp;
// 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);
CREATE_FUNC(HelloWorld);
void callfunc(int a,int b,int c);
void callFuncN(Node* sender);
void testArray();
void testDic();
void testAnimation();
virtual void draw(cocos2d::Renderer* renderer, const cocos2d::Mat4 &transform, uint32_t flags);
protected:
void onDraw( const cocos2d::Mat4 &transform, uint32_t flags);
cocos2d::CustomCommand _customCommand;
};
#endif // __HELLOWORLD_SCENE_H__