Ejemplo n.º 1
0
 public static void Init()
 {
     itemDB  = ItemDB.LoadDB();
     levelDB = LevelDB.LoadDB();
     window  = (LevelEditor)EditorWindow.GetWindow(typeof(LevelEditor), false, "Level Editor");
     window.Show();
 }
Ejemplo n.º 2
0
        private void LoadLevelData()
        {
            LevelDB   levelDB   = LevelDB.LoadDB();
            LevelData levelData = levelDB.levelList[currentLevel - 1];

            limit      = levelData.limit;
            star1      = levelData.star1;
            star2      = levelData.star2;
            star3      = levelData.star3;
            totalLevel = levelDB.levelList.Count;
            if (levelData.background)
            {
                background.GetComponent <SpriteRenderer>().sprite = levelData.background;
            }
        }
Ejemplo n.º 3
0
        public static List <LevelData> Load()
        {
            GameObject obj = Resources.Load("LevelDB", typeof(GameObject)) as GameObject;

            print(obj);
                        #if UNITY_EDITOR
            if (obj == null)
            {
                obj = CreatePrefab();
            }
                        #endif

            LevelDB instance = obj.GetComponent <LevelDB> ();
            return(instance.levelList);
        }