using A2W; using UnityEngine; public class GameFlowMgr : Singleton { // Start is called once before the first execution of Update after the MonoBehaviour is created public LevelData levelData; void Start() { levelData = Resources.Load("LevelData/LevelData"); Debug.Log(levelData.levels.Count); } // Update is called once per frame void Update() { } public void StartGame() { if (levelData.currentLevelIndex < 0) { throw new System.Exception("请选择关卡"); } Debug.Log(levelData.levels[levelData.currentLevelIndex].sceneName); StageSelector.EnterStage(levelData.levels[levelData.currentLevelIndex].sceneName); } public void completeLevel(int index) { levelData.currentLevelIndex = ++index; StageSelector.EnterStage("Stage1"); } }