CCControlEvent 未定义标识符

#ifndef __TOLLGATE_SCENE_H__

#define __TOLLGATE_SCENE_H__

#include"cocos2d.h"

#include"Player.h"

#include"cocos-ext.h"

USING_NS_CC;

using namespace cocos2d::extension;

class TollgateScene :public Layer

{

public:

static Scene * createScene();

virtual bool init();

CREATE_FUNC(TollgateScene);

void update(float delta);

private:

void initBG(); //init game background

Sprite * m_bgSprite_one; //background sprite one

Sprite * m_bgSprite_two; //background sprite two

Player * m_player;

//jump button

void createJumpBtn();

//jump event

void jumpEvent(Object * pSender, CCControlEvent event);

};

#endif

不管是CCControlEvent 还是 ControlEvent都会显示未定义标识符,,环境win8+vs2013+cocos2d-x-3.1.1

麻烦了,求大神解答。

顶上加上USING_NS_CC_EXT;

USING_NS_CC_EXT;其实就是using namespace cocos2d::extension;你可以跳转到定义看看

是的,刚才没有注意看到,那你的问题解决没有

3.X变成用EventType了,具体参照extensions->GUI->CCControlExtension->CCControl.h中的相关定义。

代码请以图片为准,我不知道那个直接贴上去的代码头文件怎么会有那么多斜杠