public void CallBack(CallBackEvents callBack) { if (callBack == CallBackEvents.Cutscene_Done) { m_ScreenFade.BeginFadeOut(); } }
//Loads the next level public void LoadNext() { if (m_Loading) { return; } if (m_Fader != null) { GameData.Instance.CurrentLevel = m_NextLevel; GameData.Instance.CurrentSection = m_NextSection; //Tell Game Data to load next level GameData.Instance.resetCheckPoint(); //Reset the checkpoint GameData.Instance.FirstTimePlayingLevel = true; // reset first time playing m_Fader.BeginFadeOut(); m_Loading = true; return; } else { GameData.Instance.CurrentLevel = m_NextLevel; GameData.Instance.CurrentSection = m_NextSection; //Tell Game Data to load next level GameData.Instance.resetCheckPoint(); //Reset the checkpoint GameData.Instance.FirstTimePlayingLevel = true; // reset first time playing Application.LoadLevel(Constants.LOADING_SCREEN); // load the next level } }