Iphone cocas2d游戏:播放声音
问题描述:
我也面临同样的问题..通过做这个背景音乐停止,但我的情况下,我想播放一段时间的另一个声音..就像一个爆炸声,然后再播放旧的声音..但是当我做这种类型的代码 [[SimpleAudioEngine sharedEngine] stopBackgroundMusic]; [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@“blast.wav”loop:TRUE]; [[SimpleAudioEngine sharedEngine] stopBackgroundMusic]; [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@“background.wav”loop:TRUE]; 我爆炸声音不玩...背景声音刚停秒。和THN再次打..需要帮助Iphone cocas2d游戏:播放声音
答
[[SimpleAudioEngine sharedEngine] stopBackgroundMusic];
停止后台music.you可以使用playEffect后。
[[SimpleAudioEngine sharedEngine] playEffect:@"blast.wav"];
thanku多数民众赞成在工作:) – 2011-04-13 07:42:44