I get this error after about 80 laser shots using a controllable timer, so it fires every 0.2 seconds.
* Application termination due to the uncaught exception “Resource failed to load”, reason: “Resource squish.mp3 cannot be loaded” * First throw call stack:
Here is the code that I use to play sound and create a laser. squish.mp3 is an audio file that plays when an object is destroyed. Can anyone help? Is SKAction not very good for sound reproduction?
SKAction *sound = [SKAction playSoundFileNamed:@"lazer.mp3" waitForCompletion:NO];
[self runAction:sound];
[self removeActionForKey:@"sound"];
SKSpriteNode *laser = [SKSpriteNode spriteNodeWithImageNamed:@"fire"];
source
share