private void ChangeToNextScene() { if (null != m_CurrentHandler) { m_CurrentHandler.EndStory(); } m_CurIndex++; if (m_Colliders.Length > m_CurIndex) { if (null != m_Colliders[m_CurIndex]) { m_CurrentHandler = m_Colliders[m_CurIndex].GetComponent <StroyHandler>(); } if (null != m_CurrentHandler) { m_CurrentHandler.StartStory(); } else { Debug.LogError("AirWall must have a StoryHandler"); } } if (m_Colliders.Length == m_CurIndex + 1) { if (StoryEndType.SectionEnd == m_EndType) { EndSection(); } else if (StoryEndType.GameEnd == m_EndType) { StartCoroutine(EndGame()); } } }
private void OnGameStart() { Debug.LogError("On Game Start"); m_CurIndex = -1; m_CurrentHandler = null; ChangeToNextScene(); }