Im using this code to add background music to my game levels
[self runAction:[SKAction playSoundFileNamed:@"dasdas.mp3" waitForCompletion:NO]];
I want it to stop when Game Over happens. Is there a way to cancel/stop the SKAction, lower volume, anything to stop it?
I know Im suppose to use this code
Instead of:
[node runAction:action withKey:@"BackgroundMusicAction"]
Then stop it by calling the SKNode's method:
- (void)removeActionForKey:(NSString *)key;
with a key you used for creating the action.
but how do I create a key for the first code, playsoundfilenamed and what do I type on the NSString or how do I connect them, Im a NOOB, help please