Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在另一个精灵移动时检测一个精灵的边界以防止精灵的相同位置。怎么做?任何帮助....
您可以安排方法来检查 init 方法中的位置
[self schedule:@selector(update:)];
接着
- (void)update:(ccTime)dt { if (CGRectIntersectsRect(sprite1.boundingBox, sprite2.boundingBox)) { //do what ever you want } }