我的应用程序被应用程序商店拒绝了,原因是在iOS9中运行不正确。
我已经下载了iOS9,似乎sprite纹理没有按照我创建它们的顺序执行(这在以前的iOS版本中工作得很好)。
也在
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event广为人知
for (UITouch *touch in touches) { .. }循环不会检测到正确的节点。有什么想法吗?
发布于 2015-09-20 09:28:44
我对SKSpriteNodes和IOS9有意见。精灵随机出现或不随机出现,所以我必须在它们中设置zPosition属性,现在我可以看到所有的精灵。
发布于 2015-09-20 19:32:06
在测试了这个bug之后-看起来
for (UITouch *touch in touches) { .. }实际上,不再标识所有接触位置的节点,而只标识最顶部的节点。这对使用它的游戏来说是不好的。相反,您只需要使用当前有效的以下方法:
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInNode:self];
NSArray *nodes = [self nodesAtPoint:location];
for (SKNode *node in nodes) { .. }https://stackoverflow.com/questions/32665271
复制相似问题