diff --git a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp index 5027c0cfc9..f2defcfe69 100644 --- a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp +++ b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.cpp @@ -113,9 +113,9 @@ BillBoardTest::BillBoardTest() : _camera(nullptr) { //Create touch listener - /*auto listener = EventListenerTouchAllAtOnce::create(); + auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesMoved = CC_CALLBACK_2(BillBoardTest::onTouchesMoved, this); - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);*/ + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); auto layer3D=Layer::create(); addChild(layer3D,0); @@ -276,7 +276,6 @@ void BillBoardTest::update(float dt) { } -/* void BillBoardTest::onTouchesMoved(const std::vector& touches, Event* event) { if(touches.size()==1) @@ -299,7 +298,7 @@ void BillBoardTest::onTouchesMoved(const std::vector& touches, Event* ev cameraPos+=cameraRightDir*newPos.x*0.5; _camera->setPosition3D(cameraPos); } -}*/ +} void BillBoardTest::rotateCameraCallback(Ref* sender,float value) { diff --git a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.h b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.h index 507c8dd2c5..4ee680a251 100644 --- a/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.h +++ b/tests/cpp-tests/Classes/BillBoardTest/BillBoardTest.h @@ -58,7 +58,7 @@ public: void addNewBillBoradWithCoords(cocos2d::Vec3 p); void addNewAniBillBoradWithCoords(cocos2d::Vec3 p); void rotateCameraCallback(cocos2d::Ref* sender,float value); - //void onTouchesMoved(const std::vector& touches, cocos2d::Event* event) override; + void onTouchesMoved(const std::vector& touches, cocos2d::Event* event); void menuCallback_orientedPoint(cocos2d::Ref* sender); void menuCallback_orientedPlane(cocos2d::Ref* sender);