Ejemplo n.º 1
0
        /// <summary>
        /// 初始化地图
        /// </summary>
        public static void InitMap()
        {
            try
            {
                ShapManager.currentIndex = int.Parse(GameInfoSaveManager.GetAttributeInfo("currentIndex"));
            }
            catch
            {
                ShapManager.currentIndex = 0;
            }
            Debug.Log("获取生成进度");
            Map map = GameInfoSaveManager.GetClassInfo <Map>("BlockPuzzleMap");

            if (map == null)
            {
                SetDefaultMap();
                Debug.Log("设置默认地图信息");
            }
            else
            {
                _mapInfo = map._mapInfo;
                Debug.Log("读取已储存的地图信息");
            }
        }