示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="validateData"></param>
        /// <param name="callback"></param>
        public static void DeserializeAsync(Stream stream, bool validateData, Action <SceneChunkData> callback)
        {
            var reader    = new TableStreamAsyncReader(stream, validateData);
            var chunkData = new SceneChunkData();

            chunkData._ReadAsync(reader);
            reader.StartAsync(READ_COUNT_PER_FRAME, () =>
            {
                if (null != callback)
                {
                    callback(chunkData);
                }
            });
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="validateData"></param>
        /// <param name="callback"></param>
        public static void DeserializeAsync(Stream stream, bool validateData, Action <SceneLevelData> callback)
        {
            var reader    = new TableStreamAsyncReader(stream, validateData);
            var levelData = new SceneLevelData();

            levelData._ReadAsync(reader);
            reader.StartAsync(100, () =>
            {
                if (null != callback)
                {
                    callback(levelData);
                }
            });
        }