示例#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);
        }
示例#2
0
        public override void LoadDataFromBuffer(byte[] bytes)
        {
            XQFileStream file = new XQFileStream();


            if (file != null)
            {
                file.Open(bytes);
            }
            {
                CMusicInfoManager MusicinfoMgr = CMusicInfoManager.MusicDataMgr;
                bool nRes = MusicinfoMgr.LoadMusic(file);

                if (null != MusicinfoMgr)
                {
                    if (!nRes)
                    {
                        Debug.LogError("CMusicInfoManager load data failed!");
                    }

                    nRes = MusicinfoMgr.LoadStage(file);
                }
                else
                {
                    Debug.LogError("CMusicInfoManager is null!");
                }

                CSceneInfoManager ScenceinfoMgr = StaticData.SceneDataMgr;
                if (null != ScenceinfoMgr)
                {
                    nRes = ScenceinfoMgr.Load(file);
                    if (!nRes)
                    {
                        Debug.LogError("CSceneInfoManager load data failed!");
                    }
                }
                else
                {
                    Debug.LogError("CSceneInfoManager is null!");
                }

                CModelInfoManager ModelinfoMgr = StaticData.ModelDataMgr;
                if (null != ModelinfoMgr)
                {
                    nRes = ModelinfoMgr.Load(file);
                    if (!nRes)
                    {
                        Debug.LogError("CModelInfoManager load data failed!");
                    }
                }
                else
                {
                    Debug.LogError("CModelInfoManager is null!");
                }
                file.Close();
            }
        }
示例#3
0
        public static void Load(byte[] bytes)
        {
            XQFileStream fs = new XQFileStream();

            fs.Open(bytes);

            if (fs.IsOpen())
            {
                int    count     = fs.ReadInt();
                string assetName = null;
                for (int i = 0; i < count; ++i)
                {
                    assetName            = fs.ReadString();
                    mDicAsset[assetName] = 0;
                }
            }

            fs.Close();
        }