Merge pull request #11358 from WenhaiLin/v3-autotest

Fixed the test case of BillBoard not respond touch event as expected.
This commit is contained in:
minggo 2015-04-09 15:11:17 +08:00
commit d9acaa444a
2 changed files with 4 additions and 5 deletions

View File

@ -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<Touch*>& touches, Event* event)
{
if(touches.size()==1)
@ -299,7 +298,7 @@ void BillBoardTest::onTouchesMoved(const std::vector<Touch*>& touches, Event* ev
cameraPos+=cameraRightDir*newPos.x*0.5;
_camera->setPosition3D(cameraPos);
}
}*/
}
void BillBoardTest::rotateCameraCallback(Ref* sender,float value)
{

View File

@ -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<cocos2d::Touch*>& touches, cocos2d::Event* event) override;
void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
void menuCallback_orientedPoint(cocos2d::Ref* sender);
void menuCallback_orientedPlane(cocos2d::Ref* sender);