private StageTable GetStageTable() { int num = 0; if (curStageNum > stageMax) { num = randomStage; } else { num = curStageNum; } return(stageDataBase.GetStageList()[num - 1]); }
private void LoadNextScene() { Pauser.DestoryTarget(); //次のステージ# int nextStageNum; int.TryParse(SceneManager.GetActiveScene().name.Remove(0, 5), out nextStageNum); nextStageNum++; //クリアしたステージ数 int clearedStageNum = 0; int stageNumMax = stageDataBase.GetStageList().Count; for (int i = 1; i <= stageNumMax; i++) { if (PlayerPrefs.HasKey("Stage" + i.ToString())) { clearedStageNum++; } } //次のシーンへ if (clearedStageNum == stageNumMax) { SceneManager.LoadScene("Ending"); } else { if (nextStageNum > stageNumMax) { SceneManager.LoadScene("StageSelect"); } else { SceneManager.LoadScene("Stage" + nextStageNum.ToString()); } } }
// Use this for initialization void Start() { stageNumMax = stageDataBase.GetStageList().Count; nowStageNum = 1; nowDoorNum = 1; }