2

I have a new game I've just started building in sprite kit with swift and I'm wondering how I can use a SKEmitterNode seamlessly across multiple scenes. At the moment my game consists of 3 scenes: menu, game and game over. I want to use the SKEmitterNode in the background across all 3 scenes without any stops. Any help would be much appreciated, thanks!

4

1 回答 1

2

感谢 KnightOfDragon 和 Whirlwind 在评论中的帮助,只需将发射器传递到下一个场景就可以正常工作并且不会中断粒子。

SKEmitterNode在“介绍”场景中设置并在全球范围内声明它。

然后在移动到下一个之前的当前场景上:

emitter.removeFromParent()

在新场景中:

addChild(emitter)
于 2016-03-19T03:55:26.340 回答