public bool IsWatchTabActive(string state_name) { if (!WatchController.Get().enabled) { return(false); } Watch.State state = (Watch.State)Enum.Parse(typeof(Watch.State), state_name); return(this.m_State == state); }
private void Update() { if (this.m_RotationBlocked && WatchController.Get().IsActive()) { Player.Get().UnblockRotation(); this.m_RotationBlocked = false; } else if (!this.m_RotationBlocked && !WatchController.Get().IsActive()) { Player.Get().BlockRotation(); this.m_RotationBlocked = true; } }
public override void ControllerUpdate() { base.ControllerUpdate(); bool flag = (GreenHellGame.IsPCControllerActive() && InputsManager.Get().IsActionActive(InputsManager.InputAction.RMB)) || (GreenHellGame.IsPadControllerActive() && InputsManager.Get().IsActionActive(InputsManager.InputAction.ZoomMap)); if (flag != this.m_Animator.GetBool(this.m_ZoomHash)) { this.m_Animator.SetBool(this.m_ZoomHash, flag); } if (this.m_CursorVisible && WatchController.Get().IsActive()) { CursorManager.Get().ShowCursor(false, false); this.m_CursorVisible = false; return; } if (!this.m_CursorVisible && !WatchController.Get().IsActive() && GreenHellGame.IsPCControllerActive()) { CursorManager.Get().ShowCursor(true, true); this.m_CursorVisible = true; } }
private bool CanAttack() { return(!FightController.s_BlockFight && !MainLevel.Instance.IsPause() && Time.time - MainLevel.Instance.m_LastUnpauseTime >= 0.25f && !this.m_Player.IsDead() && !SwimController.Get().IsActive() && !HUDWheel.Get().enabled&& !BodyInspectionController.Get().IsActive() && !WatchController.Get().IsActive() && !NotepadController.Get().IsActive() && !MapController.Get().IsActive() && this.m_ActionAllowed && !this.m_Player.GetRotationBlocked() && !Inventory3DManager.Get().gameObject.activeSelf&& !HitReactionController.Get().IsActive() && !base.IsBlock() && this.m_CurrentParam != 6 && this.m_CurrentParam != 8 && !ScenarioManager.Get().IsBoolVariableTrue("PlayerMechGameEnding") && !HUDSelectDialog.Get().enabled); }
protected virtual bool CanBlock() { return(!PlayerConditionModule.Get().IsStaminaCriticalLevel() && !SwimController.Get().IsActive() && !Inventory3DManager.Get().gameObject.activeSelf&& !WatchController.Get().IsActive() && !MapController.Get().IsActive() && !TriggerController.Get().IsGrabInProgress() && !Player.Get().m_Aim); }
private bool CanAttack() { return(!MainLevel.Instance.IsPause() && !this.m_Player.IsDead() && !SwimController.Get().IsActive() && !HUDWheel.Get().enabled&& !BodyInspectionController.Get().IsActive() && !WatchController.Get().IsActive() && !NotepadController.Get().IsActive() && !MapController.Get().IsActive() && this.m_ActionAllowed && !this.m_Player.GetRotationBlocked() && !Inventory3DManager.Get().gameObject.activeSelf&& !HitReactionController.Get().IsActive() && !base.IsBlock() && this.m_CurrentParam != 6 && this.m_CurrentParam != 8); }
public void OnInputAction(InputActionData action_data) { if (action_data.m_Action == InputsManager.InputAction.PrevItemOrPage) { if (!WatchController.Get().IsActive()) { this.SetPrevPage(); return; } } else if (action_data.m_Action == InputsManager.InputAction.NextItemOrPage) { if (!WatchController.Get().IsActive()) { this.SetNextPage(); return; } } else if (action_data.m_Action == InputsManager.InputAction.NotepadNextTab) { switch (this.m_ActiveTab) { case MenuNotepad.MenuNotepadTab.StoryTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.ItemsTab, false); return; case MenuNotepad.MenuNotepadTab.MapTab: break; case MenuNotepad.MenuNotepadTab.ItemsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.PlantsTab, false); return; case MenuNotepad.MenuNotepadTab.ConstructionsTab: if (GreenHellGame.Instance.m_GameMode == GameMode.Survival) { this.SetActiveTab(MenuNotepad.MenuNotepadTab.ItemsTab, false); return; } this.SetActiveTab(MenuNotepad.MenuNotepadTab.StoryObjectivesTab, false); return; case MenuNotepad.MenuNotepadTab.FirecampTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.WaterConstructionsTab, false); return; case MenuNotepad.MenuNotepadTab.TrapsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.ConstructionsTab, false); return; case MenuNotepad.MenuNotepadTab.SkillsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.MudBuildingsTab, false); return; case MenuNotepad.MenuNotepadTab.WaterConstructionsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.TrapsTab, false); return; case MenuNotepad.MenuNotepadTab.HealingItemsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.SkillsTab, false); return; case MenuNotepad.MenuNotepadTab.PlantsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.HealingItemsTab, false); return; case MenuNotepad.MenuNotepadTab.CustomConstructionsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.FirecampTab, false); return; case MenuNotepad.MenuNotepadTab.StoryObjectivesTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.StoryTab, false); return; case MenuNotepad.MenuNotepadTab.MudBuildingsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.CustomConstructionsTab, false); return; default: return; } } else if (action_data.m_Action == InputsManager.InputAction.NotepadPrevTab) { switch (this.m_ActiveTab) { case MenuNotepad.MenuNotepadTab.StoryTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.StoryObjectivesTab, false); return; case MenuNotepad.MenuNotepadTab.MapTab: break; case MenuNotepad.MenuNotepadTab.ItemsTab: if (GreenHellGame.Instance.m_GameMode == GameMode.Survival) { this.SetActiveTab(MenuNotepad.MenuNotepadTab.ConstructionsTab, false); return; } this.SetActiveTab(MenuNotepad.MenuNotepadTab.StoryTab, false); return; case MenuNotepad.MenuNotepadTab.ConstructionsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.TrapsTab, false); break; case MenuNotepad.MenuNotepadTab.FirecampTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.CustomConstructionsTab, false); return; case MenuNotepad.MenuNotepadTab.TrapsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.WaterConstructionsTab, false); return; case MenuNotepad.MenuNotepadTab.SkillsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.HealingItemsTab, false); return; case MenuNotepad.MenuNotepadTab.WaterConstructionsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.FirecampTab, false); return; case MenuNotepad.MenuNotepadTab.HealingItemsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.PlantsTab, false); return; case MenuNotepad.MenuNotepadTab.PlantsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.ItemsTab, false); return; case MenuNotepad.MenuNotepadTab.CustomConstructionsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.MudBuildingsTab, false); return; case MenuNotepad.MenuNotepadTab.StoryObjectivesTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.ConstructionsTab, false); return; case MenuNotepad.MenuNotepadTab.MudBuildingsTab: this.SetActiveTab(MenuNotepad.MenuNotepadTab.SkillsTab, false); return; default: return; } } }
protected virtual bool CanBlock() { return(!FightController.s_BlockFight && !this.m_WasBlockBroken && !SwimController.Get().IsActive() && !Inventory3DManager.Get().gameObject.activeSelf&& !WatchController.Get().IsActive() && !MapController.Get().IsActive() && !TriggerController.Get().IsGrabInProgress() && !Player.Get().m_Aim&& !CraftingController.Get().IsActive() && !Player.Get().m_Animator.GetBool(TriggerController.Get().m_BDrinkWater) && this.m_LastBlockTime <= Time.time - (PlayerConditionModule.Get().IsLowStamina() ? 1f : 0.5f) && !ScenarioManager.Get().IsDream() && !ScenarioManager.Get().IsBoolVariableTrue("PlayerMechGameEnding")); }
public void Activate() { if (CutscenesManager.Get().IsCutscenePlaying()) { return; } if (base.gameObject.activeSelf) { return; } if (BodyInspectionMiniGameController.Get().IsActive()) { return; } if (VomitingController.Get().IsActive()) { return; } if (SwimController.Get().IsActive()) { return; } if (ConsciousnessController.Get().IsActive()) { return; } if (WatchController.Get().IsActive()) { return; } if (SleepController.Get().IsActive()) { return; } if (InsectsController.Get().IsActive()) { return; } if (HarvestingAnimalController.Get().IsActive()) { return; } if (HarvestingSmallAnimalController.Get().IsActive()) { return; } if (Player.Get().IsDead()) { return; } if (HitReactionController.Get().IsActive()) { return; } if (TriggerController.Get().IsGrabInProgress()) { return; } if (HUDMovie.Get().enabled&& HUDMovie.Get().gameObject.activeSelf) { return; } if (Player.Get().m_Aim || Time.time - Player.Get().m_StopAimTime < 0.5f) { return; } base.gameObject.SetActive(true); this.BlockPlayerRotation(true); if (!Player.Get().m_BodyInspectionController.IsActive() && !CraftingManager.Get().gameObject.activeSelf) { Player.Get().StartController(PlayerControllerType.Inventory); if (Player.Get().m_ControllerToStart != PlayerControllerType.Unknown) { Player.Get().StartControllerInternal(); } } this.m_Camera.enabled = true; this.m_Canvas.gameObject.SetActive(true); CursorManager.Get().ShowCursor(true); HUDManager.Get().SetActiveGroup(HUDManager.HUDGroup.Inventory3D); this.m_CarriedItem = null; this.SetupPocket(this.m_ActivePocket); Player.Get().m_BackpackWasOpen = true; if (BodyInspectionController.Get().IsActive()) { HintsManager.Get().ShowHint("Inspection_Backpack", 10f); } this.m_ActivityChanged = true; }