I want to be able to turn off sound effects that I run with SKAction. This code is in my GameScene
.
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
if (//an argument) {
let playSound = SKAction.playSoundFileNamed("SoundDing.wav", waitForCompletion: false)
self.runAction(playSound)
}
}
I want the button that will mute the sounds to be in my GameStartScene
. How do I go about doing this.