18 lines
524 B
C++
18 lines
524 B
C++
|
|
#include "YSAudioEngine.h"
|
||
|
|
|
||
|
|
SINGLETON_STORAGE(YSAudioEngine);
|
||
|
|
|
||
|
|
void YSAudioEngine::playBackgroundMusic(const char* filePath, bool loop/* = false*/)
|
||
|
|
{
|
||
|
|
CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic(filePath, loop);
|
||
|
|
}
|
||
|
|
|
||
|
|
unsigned int YSAudioEngine::playEffect(const char* filePath)
|
||
|
|
{
|
||
|
|
return CocosDenshion::SimpleAudioEngine::getInstance()->playEffect(filePath);
|
||
|
|
}
|
||
|
|
|
||
|
|
void YSAudioEngine::playBtnClickEffect()
|
||
|
|
{
|
||
|
|
CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("common/sound/button_click.mp3");
|
||
|
|
}
|