APTouchChecker APTouchManager::createCheckerWithRect(const cocos2d::Rect& rect) { return [rect](cocos2d::Touch* touch)->bool{ return rect.containsPoint(touch->getLocation()); }; }
bool RunnerSprite::isCollisionWithRight(cocos2d::Rect box){ auto manBox = mRunner->boundingBox(); Vec2 manPoint = Vec2(manBox.getMaxX(),manBox.getMidY()); return box.containsPoint(manPoint); }