步骤一:首先自定义类(这里Himi自定义类名 “MySprite”)
MySprite.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#ifndef
__mtet__MySprite__
#define
__mtet__MySprite__
#include
"cocos2d.h"
using namespace cocos2d;
class MySprite
: public CCSprite{
public :
static MySprite*
createMS( const char *
fileName);
};
#endif
/* defined(__mtet__MySprite__) */
|
MySprite.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
|
|
请发表评论