【发布时间】:2014-12-11 09:38:57
【问题描述】:
我想使用 Cocos2d-x 3.2 检测 Android 上的后退按钮按下事件。 我研究了一些主题,但这些方法适用于 Cocos2d-x 2.x,在 3.2 版本中已弃用。 我试过了
listener_ = EventListenerKeyboard::create();
listener_->onKeyPressed = CC_CALLBACK_2(GameOverScene::onKeyPressed, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener_, this);
但没有检测到任何东西。
请你帮帮我吧!
非常感谢!
【问题讨论】:
标签: android cocos2d-x cocos2d-x-3.0