cocos2d-3.2 添加背景音乐和点击音效

前端之家收集整理的这篇文章主要介绍了cocos2d-3.2 添加背景音乐和点击音效前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


#include "SimpleAudioEngine.h"

添加音乐和加true循环播放

if ( !SimpleAudioEngine::getInstance()->isBackgroundMusicPlaying()) {

SimpleAudioEngine::getInstance()->playBackgroundMusic("bk.mp3",true);

}

SimpleAudioEngine::getInstance()->playEffect("m1.wav");

原文链接:https://www.f2er.com/cocos2dx/344202.html

猜你在找的Cocos2d-x相关文章