示例#1
0
        private GameMapLevel CreateNewLevel(string name, int level)
        {
            GameMapLevel gml = Instantiate <GameMapLevel>(prototypeGameMapLevel, transform);

            gml.Init(level);
            gml.gameObject.name = name;
            levels.Add(gml);
            return(gml);
        }
示例#2
0
        private IEnumerator CreateLayers()
        {
            GameMapData gmap = GameMgmt.Get().data.map;

            //load layer
            levels = new List <GameMapLevel>();
            for (int i = 0; i < gmap.levels.Count; i++)
            {
                GameMapLevel g = CreateNewLevel(gmap.levels[i].name, i);
                yield return(g.AddLayers());
            }
            view.Init();
        }