Playing audio in cocos2d v3

六眼飞鱼酱① 提交于 2019-12-14 03:12:26

问题


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


回答1:


 [[OALSimpleAudio sharedInstance] playBg:@"bakground.caf" loop:YES];


来源:https://stackoverflow.com/questions/21797531/playing-audio-in-cocos2d-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!