I have made a custom class, SoundNode, to handle the playing of audio files. For now, it only plays the default "A2.mp3"
class SoundNode : SKSpriteNode{
func playSound(){
run(SKAction.playSoundFileNamed("A2", waitForCompletion: false))
}
}
I then call the playSound method in my SKScene like so:
SoundNode().playSound()
But, the sound never plays?? I have made sure the file exists within my project and have also double checked the file name to make sure it is correct. What is the problem here?