2

I'm checking code of a build game by another developer. You can understand how tuf it is. :)

I have to make a change in its sound.

When game is running the background sound remain same till game is over.

My task is to change sound after a specific time.

[[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"background.wav" loop:TRUE];

This piece of code is used by the old developer.

I don't know how to make chnage according to my need.

Guru
  • 21,652
  • 10
  • 63
  • 102
Haseeb Warraich
  • 141
  • 1
  • 2
  • 12

1 Answers1

3

Yea! difficult task indeed! :)

Does a function is calling at the time you want to stop the background music? Like game paused, game over etc. In that case use this.

[[SimpleAudioEngine sharedEngine] stopBackgroundMusic];

After that you can change to another background or do whatever.

ShinuShajahan
  • 1,296
  • 2
  • 11
  • 20