本文介绍了在cocos2d V3播放音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得背景音乐播放和循环以及一次性现在听起来每又一次,例如提升等级等。

我发现这个很多教程正在使用SimpleAudioEngine,但是当我输入SimpleAudioEngine.h编译器指出SimpleAudioEngine.h找不到文件

我使用SpriteBuilder和Cocos2d V3。

有谁知道在哪里我可以从得到这个班?

感谢


解决方案

  [OALSimpleAudio sharedInstance] playBg:@bakground.caf循环:YES];

I am trying to get background music playing and looping as well as one-shot sounds every now and again, e.g. level up etc.

I have found many tutorials on this that are using SimpleAudioEngine, but when I import SimpleAudioEngine.h the compiler is stating "SimpleAudioEngine.h file not found"

I am using SpriteBuilder and cocos2d v3.

Does anyone know where I can get this class from?

Thanks

解决方案
 [[OALSimpleAudio sharedInstance] playBg:@"bakground.caf" loop:YES];

这篇关于在cocos2d V3播放音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-15 16:23