// protected void SetMissionIsFinished() { //IMMMMMMMPORTAAAAAANT!!!!!! //Truck level has a copy of this function!!!!!!!! if (mapLogic.playerCharNew.IsMissionFailed()) { return; } int nextLvlNum = GameController.GetNextLevelNumber(); int oldLvlNum = GameController.gameCurrentLevel; if (GameController.gameLastLevel < nextLvlNum) { GameController.SetGameLastLevel(nextLvlNum); GameSaveLoadController.SaveGameState(); } if (nextLvlNum > oldLvlNum) { GameController.LoadLevelLoadingPage(nextLvlNum, 0); } else { GameController.LoadCredits(); } }
public static void LoadCurrentLevelFromBeginning() { SetGameCurrentLevelLastCheckPoint(0); GameSaveLoadController.SaveGameState(); Application.LoadLevel(GeneralStats.LevelsStartingIndex + gameCurrentLevel); }
public virtual void SaveCheckPoint(float _step) { int st = (int)_step; PlayerCharacterNew.Instance.CheckPointSaveTransition(); GameSaveLoadController.SavePlayerState(); GameController.SetGameCurrentLevelLastCheckPoint(st); GameSaveLoadController.SaveGameState(); }
// //public static bool GetKey(KeyCode _keyCode) //{ // return Input.GetKey(_keyCode); //} //public static bool GetKeyDown(KeyCode _keyCode) //{ // return Input.GetKeyDown(_keyCode); //} //public static bool GetKeyUp(KeyCode _keyCode) //{ // return Input.GetKeyUp(_keyCode); //} //public static bool GetButton(string _btnName) //{ // return Input.GetButton(_btnName); //} //public static bool GetButtonDown(string _btnName) //{ // return Input.GetButtonDown(_btnName); //} //public static bool GetButtonUp(string _btnName) //{ // return Input.GetButtonUp(_btnName); //} //public static bool GetKey_IfGameIsNotPaused(KeyCode _keyCode) //{ // if (isGamePaused) // return false; // return Input.GetKey(_keyCode); //} //public static bool GetKeyDown_IfGameIsNotPaused(KeyCode _keyCode) //{ // if (isGamePaused) // return false; // return Input.GetKeyDown(_keyCode); //} //public static bool GetKeyUp_IfGameIsNotPaused(KeyCode _keyCode) //{ // if (isGamePaused) // return false; // return Input.GetKeyUp(_keyCode); //} //public static bool GetButton_IfGameIsNotPaused(string _btnName) //{ // if (isGamePaused) // return false; // return Input.GetButton(_btnName); //} //public static bool GetButtonDown_IfGameIsNotPaused(string _btnName) //{ // if (isGamePaused) // return false; // return Input.GetButtonDown(_btnName); //} //public static bool GetButtonUp_IfGameIsNotPaused(string _btnName) //{ // if (isGamePaused) // return false; // return Input.GetButtonUp(_btnName); //} // public static void LoadLevel(int _lvlNum, int _checkpointNum) { int lvlNum = _lvlNum; int checkpointNum = _checkpointNum; SetGameCurrentLevel(lvlNum); SetGameCurrentLevelLastCheckPoint(checkpointNum); GameSaveLoadController.SaveGameState(); Application.LoadLevel(GeneralStats.LevelsStartingIndex + gameCurrentLevel); }
protected void SetMissionIsFinished() { int nextLvlNum = GameController.GetNextLevelNumber(); int oldLvlNum = GameController.gameCurrentLevel; if (GameController.gameLastLevel < nextLvlNum) { GameController.SetGameLastLevel(nextLvlNum); GameSaveLoadController.SaveGameState(); } if (nextLvlNum > oldLvlNum) { GameController.LoadLevelLoadingPage(nextLvlNum, 0); } else { GameController.LoadCredits(); } }