阅读背景:

Swift:Sprite Kit中的多个场景,来自第二个和第一个场景的不同SpriteNodes类型的touchesBegan被调用

来源:互联网 

I am facing a problem using multiple scenes in Sprite Kit (Swift). I’ve setup 3 scene (the game scene, preferences and a help scene). I’ve defined two different SpriteNode classes, called CardItem and MenuItem. While I am using CardItem just at the game scene, I uses MenuItem at all three scenes. So when I touch at the game scene (standard scene) the CardItem SpriteNode, just the touchesBegan function from that class (in game scene) is called. But when I jump into the preferences or help scene (from the game scene), and touch on a SpriteNode MenuItem not just their touchesBegan functions is called but also the touchesBegan from the CardItem type at the game scene!!! (which still is available in the back) is called.I am facing a problem using multiple scenes in




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: