【发布时间】:2017-06-22 15:19:44
【问题描述】:
所以我的一个 SKEmitterNode 有问题。我有一个 SKSpriteNode,当触摸它时会打开一个新场景。这是开始接触的代码:
for touch: AnyObject in touches {
let location = (touch as! UITouch).location(in: self)
if let nodeName = self.atPoint(location).name {
if nodeName == "playBox" || nodeName == "playButton" {
buttonSound()
pulse(playBox, scene: "GameScene")
}else if nodeName == "shopBox" || nodeName == "shopButton"{
buttonSound()
pulse(shopBox, scene: "shop")
}}}
此时,一切正常。当我将我的 SKEmitterNode 添加到场景中时,会出现我的问题。发射器是星场效应,所以小点从场景顶部到底部。添加此发射器后,我的按钮将停止工作!
我已经尝试了所有降低生成率、降低 zPosition 的方法,但似乎没有任何效果。
如果您有任何建议,请告诉我。谢谢!
-马特
【问题讨论】:
标签: swift swift3 sprite-kit skemitternode