#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include "cocos2d.h"
#include "Box2D/Box2D.h"
#include "SimpleAudioEngine.h"
#include "GameObjHero.h"
#include "GameMark.h"
using namespace cocos2d;
class GameMain : 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
void menuCloseCallback(CCObject* pSender);
bool isOver;
CCSprite *bg1;
CCSprite *bg2;
GameObjHero *hero;
CCArray *enemys;
int blood;
CCSprite *blood1;
CCSprite *blood2;
CCSprite *blood3;
CCArray *bullets;
CCArray *enemyBullets;
GameMark *gameMark;
CCSprite *gameOver;
bool isReduce;
virtual void update(float time);
bool isCollion(CCPoint index, CCPoint point, int x, float y, int a, int b);
void setHeroHurt();
void setOver();
void resetreduce(float d);
void releaseEnemyBullet(int x, int y);
void releaseHeroBullet(int x, int y);
// implement the "static node()" method manually
CREATE_FUNC(GameMain);
};
#endif // __HELLOWORLD_SCENE_H__
不知道怎麼回事,求大神來看~
1>d:\mycplusplusproject\testprojectfour\classes\gamemain.h(30): error C2143: 語法錯誤 : 缺少“;”(在“*”的前面)
1>d:\mycplusplusproject\testprojectfour\classes\gamemain.h(30): error C4430: 缺少類型說明符 - 假定為 int。注意: C++ 不支持默認 int
int型未識別
你可能少一個補丁
VS90SP1-KB971092-X86