public void Update() { if (_hasFailed && (Configuration.Instance.autoSkip || _vrControllersInputManager.MenuButtonDown()) && !_skipped) { // Stop the base coroutine and call the necessary functions to fail the level as quickly as possible if (_standardLevel) { _standardLevelFailedController.StopAllCoroutines(); LevelCompletionResults.LevelEndAction levelEndAction = _standardInitData.autoRestart ? LevelCompletionResults.LevelEndAction.Restart : LevelCompletionResults.LevelEndAction.None; LevelCompletionResults levelCompletionResults = _prepareLevelCompletionResults.FillLevelCompletionResults(LevelCompletionResults.LevelEndStateType.Failed, levelEndAction); _standardLevelSceneSetupData.Finish(levelCompletionResults); } else { _missionLevelFailedController.StopAllCoroutines(); LevelCompletionResults.LevelEndAction levelEndAction = _missionInitData.autoRestart ? LevelCompletionResults.LevelEndAction.Restart : LevelCompletionResults.LevelEndAction.None; LevelCompletionResults levelCompletionResults = _prepareLevelCompletionResults.FillLevelCompletionResults(LevelCompletionResults.LevelEndStateType.Failed, levelEndAction); MissionObjectiveResult[] results = _missionObjectiveCheckersManager.GetResults(); MissionCompletionResults missionCompletionReuslts = new MissionCompletionResults(levelCompletionResults, results); _missionLevelSceneSetupData.Finish(missionCompletionReuslts); } _skipped = true; } }
public static bool MenuButtonDown() { return(VRControllersInputManager.MenuButtonDown()); }