mirror of https://github.com/axmolengine/axmol.git
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:
commit
d9acaa444a
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue