我在layer上添加(addchild)普通sprite和一个继承Sprite类的Hero对象
然后ontouchmove做了背景地图的拖动:
auto touchPos = Common::getTouchPos(touch);
Point touchMove = touchPos - m_lastTouchLoc;
m_lastTouchLoc = touchPos;
this->setPosition(this->getPosition() + touchMove);
发现:
普通sprite会跟着动,Hero对象不会
这是为什么?然后怎么改能使结果相反(普通sprite不动,Hero对象会跟着动)?
拜谢各位了。。。