Exemplo n.º 1
0
 void RegistMusicInfo(CMusicInfo musicinfo)
 {
     if (s_MusicInfoMap != null && musicinfo != null && musicinfo.m_nMusicID > 0)
     {
         if (s_MusicInfoMap.Contains(musicinfo.m_nMusicID))
         {
             //Debug.Log("RegistMusicInfo Duplicate,nType:" + musicinfo.m_nMusicID);
         }
         else
         {
             s_MusicInfoMap.Add(musicinfo.m_nMusicID, musicinfo);
         }
     }
 }
Exemplo n.º 2
0
        public bool LoadMusic(XQFileStream file)
        {
            DestroyMusic();
            if (file != null && file.IsOpen())
            {
                UInt16 usNumber = 0;
                file.ReadUShort(ref usNumber);

                for (UInt16 i = 0; i < usNumber; i++)
                {
                    CMusicInfo musicinfo = new CMusicInfo();
                    musicinfo.Load(ref file);
                    RegistMusicInfo(musicinfo);
                }
                s_MusicInfoMap.Sort();
                return(true);
            }
            return(false);
        }