Esempio n. 1
0
        //scene
        public bool Load()
        {
            DestroyScene();
            XQFileStream file = new XQFileStream();

            if (file != null)
            {
                file.Open("Data/sceneinfo");
                if (file.IsOpen())
                {
                    UInt16 usNumber = 0;
                    file.ReadUShort(ref usNumber);

                    for (UInt16 i = 0; i < usNumber; i++)
                    {
                        CSceneInfo sceneinfo = new CSceneInfo();
                        sceneinfo.Load(ref file);
                        RegistSceneInfo(sceneinfo);
                    }
                    file.Close();
                    s_SceneInfoMap.Sort();
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 2
0
 void RegistSceneInfo(CSceneInfo sceneinfo)
 {
     if (s_SceneInfoMap != null && sceneinfo != null)
     {
         if (s_SceneInfoMap.Contains(sceneinfo.m_nSceneID))
         {
             //Debug.Log("RegistSceneInfo Duplicate,nType:" + sceneinfo.m_nSceneID);
         }
         else
         {
             s_SceneInfoMap.Add(sceneinfo.m_nSceneID, sceneinfo);
         }
     }
 }