-
Notifications
You must be signed in to change notification settings - Fork 1
/
MusicManager.h
49 lines (41 loc) · 1.02 KB
/
MusicManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef Music_MusicManager_h
#define Music_MusicManager_h
#include "BgSound.h"
#include "MacrosDefine.h"
#include "EffectSound.h"
enum
{
BG_SOUND,
Click_Effect_Sound,
Greate_Effect_Sound,
Prefect_Effect_Sound,
Excellent_Effect_Sound,
};
class MusicManager
{
private:
MusicManager();
protected:
BgSound* m_pBgSound;
EffectSound* m_pGreateSound;
EffectSound* m_pPrefectSound;
EffectSound* m_pExcellentSound;
EffectSound* m_pClickSound;
bool isStopMusic;
public:
static MusicManager* GetInstance()
{
static MusicManager instance;
return &instance;
}
bool Stop();
bool Open();
bool Play(int type);
SWX_PROPERTY( BgSound*, m_pBgSound, BgSound );
void setGreateSound(EffectSound* sound) { m_pGreateSound = sound;};
void setPrefectSound(EffectSound* sound) { m_pPrefectSound = sound;};
void setExcellentSound(EffectSound* sound) { m_pExcellentSound = sound;};
void setClickSound(EffectSound* sound) { m_pClickSound = sound;};
~MusicManager();
};
#endif