开发者

Playing sound in cocos2d game

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 ove开发者_运维百科r.

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜