テスト環境
- Mac OS X 10.9.5
- Xcode 5.1.1
- cocos2d-x v3.2
// レイヤータッチイベント登録 auto listener = EventListenerTouchOneByOne::create(); listener->onTouchBegan = std::bind(&GameScene::onTouchBegan, this, std::placeholders::_1, std::placeholders::_2); listener->onTouchEnded = std::bind(&GameScene::onTouchEnded, this, std::placeholders::_1, std::placeholders::_2); listener->onTouchMoved = std::bind(&GameScene::onTouchMoved, this, std::placeholders::_1, std::placeholders::_2); listener->onTouchCancelled = std::bind(&GameScene::onTouchCancelled, this, std::placeholders::_1, std::placeholders::_2); getEventDispatcher()->addEventListenerWithSceneGraphPriority(listener, this);