Beispiel #1
0
APTouchChecker APTouchManager::createCheckerWithRect(const cocos2d::Rect& rect) {

	return [rect](cocos2d::Touch* touch)->bool{
		return rect.containsPoint(touch->getLocation());

	};
}
Beispiel #2
0
bool RunnerSprite::isCollisionWithRight(cocos2d::Rect box){
    auto manBox = mRunner->boundingBox();
    Vec2 manPoint = Vec2(manBox.getMaxX(),manBox.getMidY());
    return box.containsPoint(manPoint);
}