public void OnYesFromDialog() { HUDDeath.YesNoQuestion yesNoQuestion = this.m_YesNoQuestion; if (yesNoQuestion != HUDDeath.YesNoQuestion.Quit) { if (yesNoQuestion != HUDDeath.YesNoQuestion.LoadGame) { if (yesNoQuestion == HUDDeath.YesNoQuestion.LoadLastSave) { DeathController.Get().StartRespawn(); CursorManager.Get().SetCursor(CursorManager.TYPE.Normal); } } else { MenuInGameManager.Get().ShowScreen(typeof(MenuLoad)); } } else { LoadingScreen.Get().Show(LoadingScreenState.ReturnToMainMenu); GreenHellGame.Instance.ReturnToMainMenu(); } this.m_YesNoQuestion = HUDDeath.YesNoQuestion.None; }
private void Update() { if (this.m_Initialized && this.m_Scenario != null) { this.UpdateSceneLoadUnload(); if (DeathController.Get().IsState(DeathController.DeathState.None)) { this.m_Scenario.Update(); } } }
private void Update() { if (!this.m_Initialized) { return; } if (this.m_Scenario == null) { return; } if (!DeathController.Get().IsState(DeathController.DeathState.None)) { return; } this.m_Scenario.Update(); }
public void OnYesFromDialog() { switch (this.m_YesNoQuestion) { case HUDDeath.YesNoQuestion.LoadGame: MenuInGameManager.Get().ShowScreen(typeof(LoadGameMenu)); break; case HUDDeath.YesNoQuestion.LoadLastSave: DeathController.Get().StartRespawn(); CursorManager.Get().SetCursor(CursorManager.TYPE.Normal); break; case HUDDeath.YesNoQuestion.Quit: LoadingScreen.Get().Show(LoadingScreenState.ReturnToMainMenu); GreenHellGame.Instance.ReturnToMainMenu(); break; } this.m_YesNoQuestion = HUDDeath.YesNoQuestion.None; }
protected override void Update() { base.Update(); if (!this.m_IsInside) { return; } if (!DifficultySettings.ActivePreset.m_Insects) { return; } if (InsectsController.Get().IsActive()) { return; } if (MakeFireController.Get().IsActive()) { return; } if (HitReactionController.Get().IsActive()) { return; } if (HarvestingAnimalController.Get().IsActive()) { return; } if (MudMixerController.Get().IsActive()) { return; } if (HarvestingSmallAnimalController.Get().IsActive()) { return; } if (ConsciousnessController.Get().IsActive()) { return; } if (DeathController.Get().IsActive()) { return; } if (SleepController.Get().IsActive()) { return; } if (Player.Get().m_Animator.GetBool(Player.Get().m_CleanUpHash)) { return; } Item currentItem = Player.Get().GetCurrentItem(Hand.Right); if (currentItem && currentItem.m_Info.IsTorch() && ((Torch)currentItem).m_Burning) { return; } if (Player.Get().IsDead()) { return; } if (InsectsSensor.m_LastTime == 0f || Time.time - InsectsSensor.m_LastTime > this.m_Cooldown) { if (CraftingManager.Get().IsActive()) { CraftingManager.Get().Deactivate(); } InsectsController.Get().m_Sensor = this; Player.Get().StartController(PlayerControllerType.Insects); InsectsSensor.m_LastTime = Time.time; } }
public bool CanShow() { if (GreenHellGame.Instance.m_GameMode != GameMode.Story) { return(false); } if (ScenarioManager.Get().IsBoolVariableTrue("PlayerMechGameEnding")) { return(false); } if (ConsciousnessController.Get().IsActive()) { return(false); } if (SleepController.Get().IsActive()) { return(false); } if (InsectsController.Get().IsActive()) { return(false); } if (InsectsController.Get().IsActive()) { return(false); } if (SwimController.Get().IsActive()) { return(false); } if (Player.Get().m_IsInAir) { return(false); } if (ChallengesManager.Get() && ChallengesManager.Get().IsChallengeActive()) { return(false); } if (HUDReadableItem.Get().enabled) { return(false); } if (Player.Get().m_Animator.GetBool(Player.Get().m_CleanUpHash)) { return(false); } if (Time.time - SwimController.Get().m_LastDisableTime < 0.5f) { return(false); } if (Player.Get().m_IsInAir) { return(false); } if (DeathController.Get().IsActive()) { return(false); } if (ScenarioManager.Get().IsDreamOrPreDream()) { return(false); } if (Inventory3DManager.Get().IsActive()) { return(false); } if (CutscenesManager.Get().IsCutscenePlaying()) { return(false); } if (SwimController.Get().IsActive()) { return(false); } if (BodyInspectionController.Get().IsActive()) { return(false); } if (HarvestingAnimalController.Get().IsActive()) { return(false); } if (HarvestingSmallAnimalController.Get().IsActive()) { return(false); } if (VomitingController.Get().IsActive()) { return(false); } if (MapController.Get().IsActive()) { return(false); } if (NotepadController.Get().IsActive()) { return(false); } if (MudMixerController.Get().IsActive()) { return(false); } if (MakeFireController.Get().IsActive()) { return(false); } if (HUDWheel.Get().enabled) { return(false); } if (FPPController.Get().m_Dodge) { return(false); } if (GreenHellGame.IsPadControllerActive() && HUDItem.Get().m_Active) { return(false); } int shortNameHash = Player.Get().m_Animator.GetCurrentAnimatorStateInfo(1).shortNameHash; return(shortNameHash != this.m_MapWatchHideHash && shortNameHash != this.m_MapWatchIdleHash && shortNameHash != this.m_MapWatchShowHash && shortNameHash != this.m_MapZoomHash && shortNameHash != this.m_MapHideHash && shortNameHash != this.m_MapIdleHash && shortNameHash != this.m_ShowMapHash); }
protected override bool ShouldShow() { return(DeathController.Get().IsState(DeathController.DeathState.Death) && !ChallengesManager.Get().IsChallengeActive()); }
public void OnRespawn() { this.m_CoopButtonsGrp.SetActive(false); DeathController.Get().StartRespawn(); CursorManager.Get().SetCursor(CursorManager.TYPE.Normal); }
private void SetDeathReason() { switch (DeathController.Get().m_DeathType) { case DeathController.DeathType.UnderWater: case DeathController.DeathType.OnWater: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_UnderWater", true) + "</color>"; return; case DeathController.DeathType.Caiman: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Caiman", true) + "</color>"; return; case DeathController.DeathType.Predator: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Predator", true) + "</color>"; return; case DeathController.DeathType.Cut: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Cut", true) + "</color>"; return; case DeathController.DeathType.Fall: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Fall", true) + "</color>"; return; case DeathController.DeathType.Insects: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Insects", true) + "</color>"; return; case DeathController.DeathType.Melee: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Melee", true) + "</color>"; return; case DeathController.DeathType.Poison: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Poison", true) + "</color>"; return; case DeathController.DeathType.Thrust: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Thrust", true) + "</color>"; return; case DeathController.DeathType.Infection: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Infection", true) + "</color>"; return; case DeathController.DeathType.Piranha: this.m_DeathReason.enabled = true; this.m_DeathReason.text = GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Reason", true) + "<color=#b61919> " + GreenHellGame.Instance.GetLocalization().Get("HUD_Death_Piranha", true) + "</color>"; return; default: this.m_DeathReason.enabled = false; return; } }