【发布时间】:2014-08-16 18:01:45
【问题描述】:
我在屏幕上有两个 CCSprite。一个叫_star,另一个叫_redStar。
它说CGRectContainsPoint,我怎么能说像_star.boundingBox OR _redstar.boundingBox,touchLocation。我不确定这是否可行,如果可以,我只是不知道语法。任何帮助将不胜感激!
- (void)touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
CGPoint touchLocation = [touch locationInNode:_physicsNode];
if(CGRectContainsPoint((_star.boundingBox), touchLocation))
【问题讨论】:
标签: objective-c xcode cocos2d-iphone game-physics