public void LoadStage(int stageID) { if (m_rewindCoroutine != null) { StopCoroutine(m_rewindCoroutine); m_rewindCoroutine = null; } if (CurStage != null) { Destroy(CurStage.gameObject); } CurStageID = stageID; CurStage = Instantiate <StageInfo>(AllStages[CurStageID], Vector3.zero, Quaternion.identity, m_stageParent); CurStage.Initialize(); BoardManager.instance.BoardSetup(CurStage.m_gridParent, CurStage.m_chessParent); m_startButton.SetActive(true); m_stopButton.SetActive(false); m_warrior.Reset(CurStage.WarriorInitPos); m_actionController.Reset(CurStage.WarriorInitPos); // Goal Checker m_warriorChecker.Reset(); m_treasureBoxChecker.Reset(); m_scorpionChecker.Reset(); PrepareGoalChecker(); m_allProjectiles.Clear(); CurCycle = 0; m_postProcessingVolume.weight = 0f; m_BGM.pitch = 1f; CurGameState = GameState.Edit; }