123456789101112131415161718192021222324252627282930313233 |
- #pragma once
- #include <map>
- struct M_SoundCFGData
- {
- //声音ID
- int mSoundID;
- //声音名字
- std::string mSoundName;
- //声音路径
- std::string mSoundPath;
- //声音时间
- int mSoundTime;
- //声音优先级
- int mSoundPriority;
- };
- class M_SoundCFG
- {
- public:
- private:
- static std::auto_ptr<M_SoundCFG> msSingleton;
- public:
- int GetCount();
- const M_SoundCFGData* GetData(int SoundID);
- const std::map<int, M_SoundCFGData>& GetMapData();
- void Load();
- void LoadLua();
- void Reload();
- static M_SoundCFG* GetSingleton();
- static void Release();
- private:
- std::map<int, M_SoundCFGData> mMapData;
- };
|