public static void Init() { itemDB = ItemDB.LoadDB(); levelDB = LevelDB.LoadDB(); window = (LevelEditor)EditorWindow.GetWindow(typeof(LevelEditor), false, "Level Editor"); window.Show(); }
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; } }