-(BOOL) ccTouchBegan:touch withEvent:event
{
CGPoint touchLocation = [touchlocationInView: [touchview]];
touchLocation = [[CCDirector sharedDirector] convertToGL: touchLocation];
CGPoint local = [item convertToNodeSpace:touchLocation];
CGRect r = [itemrect];
r.origin =CGPointZero;
if( CGRectContainsPoint( r, local ) )
//表示点中item
}
}
cocos2d触摸点坐标转换标准写法
最新推荐文章于 2023-07-16 20:36:37 发布