public void OnCraft(GameObject obj)
 {
     if (!Player.Get().CanStartCrafting())
     {
         return;
     }
     if (NotepadController.Get().IsActive())
     {
         NotepadController.Get().Hide();
         this.m_DelayedType = HUDQuickAccessBar.TYPE.Craft;
         this.m_DelayedObj  = obj;
         return;
     }
     if (BodyInspectionController.Get().IsActive())
     {
         Player.Get().StopController(PlayerControllerType.BodyInspection);
     }
     if (!Inventory3DManager.Get().gameObject.activeSelf)
     {
         Inventory3DManager.Get().Activate();
     }
     if (!CraftingManager.Get().gameObject.activeSelf)
     {
         CraftingManager.Get().Activate();
         return;
     }
     CraftingManager.Get().Deactivate();
 }
Exemple #2
0
 public void OnInspection(GameObject obj)
 {
     if (!Player.Get().CanStartBodyInspection())
     {
         return;
     }
     if (NotepadController.Get().IsActive())
     {
         NotepadController.Get().Hide();
         this.m_DelayedType = HUDQuickAccessBar.TYPE.Inspect;
         this.m_DelayedObj  = obj;
         return;
     }
     if (CraftingManager.Get().gameObject.activeSelf)
     {
         CraftingManager.Get().Deactivate();
     }
     if (!BodyInspectionController.Get().IsActive())
     {
         Player.Get().StartController(PlayerControllerType.BodyInspection);
     }
     else
     {
         Player.Get().StopController(PlayerControllerType.BodyInspection);
     }
 }
Exemple #3
0
    private void SetupSelections()
    {
        Color color = this.m_Buttons[0].m_Icon.color;

        color.a = ((!Player.Get().CanStartCrafting()) ? this.m_InactiveAlpha : (CraftingManager.Get().gameObject.activeSelf ? this.m_SelectedAlpha : this.m_NormalAlpha));
        this.m_Buttons[0].m_Icon.color = color;
        color   = this.m_Buttons[3].m_Icon.color;
        color.a = ((!Player.Get().CanShowNotepad()) ? this.m_InactiveAlpha : (NotepadController.Get().IsActive() ? this.m_SelectedAlpha : this.m_NormalAlpha));
        this.m_Buttons[3].m_Icon.color = color;
        color   = this.m_Buttons[4].m_Icon.color;
        color.a = (Inventory3DManager.Get().gameObject.activeSelf ? this.m_SelectedAlpha : this.m_NormalAlpha);
        this.m_Buttons[4].m_Icon.color = color;
        color   = this.m_Buttons[5].m_Icon.color;
        color.a = ((!Player.Get().CanStartBodyInspection()) ? this.m_InactiveAlpha : (BodyInspectionController.Get().IsActive() ? this.m_SelectedAlpha : this.m_NormalAlpha));
        this.m_Buttons[5].m_Icon.color = color;
        color   = this.m_Buttons[1].m_Icon.color;
        color.a = ((!Player.Get().CanStartCrafting()) ? this.m_InactiveAlpha : (CraftingManager.Get().IsActive() ? this.m_SelectedAlpha : this.m_NormalAlpha));
        this.m_Buttons[1].m_Icon.color = color;
        color   = this.m_Buttons[0].m_Icon.color;
        color.a = ((!Player.Get().CanShowMap()) ? this.m_InactiveAlpha : (MapController.Get().IsActive() ? this.m_SelectedAlpha : this.m_NormalAlpha));
        this.m_Buttons[0].m_Icon.color = color;
        color   = this.m_Buttons[2].m_Icon.color;
        color.a = ((!Player.Get().CanSleep()) ? this.m_InactiveAlpha : (SleepController.Get().IsActive() ? this.m_SelectedAlpha : this.m_NormalAlpha));
        this.m_Buttons[2].m_Icon.color = color;
    }
Exemple #4
0
 private void OnNotebook()
 {
     if (!Player.Get().CanShowNotepad())
     {
         return;
     }
     if (!NotepadController.Get().IsActive())
     {
         Player.Get().StartController(PlayerControllerType.Notepad);
     }
 }
Exemple #5
0
 private void OnNotebook()
 {
     if (NotepadController.Get().IsActive())
     {
         NotepadController.Get().Hide();
         return;
     }
     if (Inventory3DManager.Get().IsActive())
     {
         Inventory3DManager.Get().Deactivate();
     }
     Player.Get().StartController(PlayerControllerType.Notepad);
 }
Exemple #6
0
 protected override void OnShow()
 {
     base.OnShow();
     Player.Get().BlockRotation();
     if (GreenHellGame.IsPCControllerActive())
     {
         CursorManager.Get().ShowCursor(true, false);
         this.m_CursorVisible = true;
         Vector3 position = base.gameObject.transform.position;
         CursorManager.Get().SetCursorPos(position);
     }
     for (int i = 0; i < 6; i++)
     {
         if (!this.IsSlotActive((HUDWheel.HUDWheelSlot)i))
         {
             this.m_Icons[i].color = this.m_InactiveColor;
         }
         else
         {
             this.m_Icons[i].color = this.m_ActiveColor;
         }
     }
     if (Inventory3DManager.Get().IsActive())
     {
         Inventory3DManager.Get().Deactivate();
     }
     if (BodyInspectionController.Get().IsActive())
     {
         BodyInspectionController.Get().Hide();
     }
     if (NotepadController.Get().IsActive())
     {
         NotepadController.Get().Hide();
     }
     if (MapController.Get().IsActive())
     {
         MapController.Get().Hide();
     }
     HUDItem.Get().Deactivate();
     this.m_SelectedSlot = HUDWheel.HUDWheelSlot.None;
     for (int j = 0; j < 6; j++)
     {
         this.m_Selections[j].enabled = false;
         this.m_Icons[j].enabled      = true;
         this.m_IconsHL[j].enabled    = false;
     }
     this.UpdateText();
 }
 public void OnBackpack(GameObject obj)
 {
     if (NotepadController.Get().IsActive())
     {
         NotepadController.Get().Hide();
         this.m_DelayedType = HUDQuickAccessBar.TYPE.Backpack;
         this.m_DelayedObj  = obj;
         return;
     }
     if (!Inventory3DManager.Get().gameObject.activeSelf)
     {
         Inventory3DManager.Get().Activate();
         return;
     }
     Inventory3DManager.Get().Deactivate();
 }
Exemple #8
0
    private void SetupSelections()
    {
        Color color = this.m_Craft.color;

        color.a            = (Player.Get().CanStartCrafting() ? ((!CraftingManager.Get().gameObject.activeSelf) ? this.m_NormalAlpha : this.m_SelectedAlpha) : this.m_InactiveAlpha);
        this.m_Craft.color = color;
        color   = this.m_Notepad.color;
        color.a = (Player.Get().CanShowNotepad() ? ((!NotepadController.Get().IsActive()) ? this.m_NormalAlpha : this.m_SelectedAlpha) : this.m_InactiveAlpha);
        this.m_Notepad.color = color;
        color   = this.m_Backpack.color;
        color.a = ((!Inventory3DManager.Get().gameObject.activeSelf) ? this.m_NormalAlpha : this.m_SelectedAlpha);
        this.m_Backpack.color = color;
        color   = this.m_Inspect.color;
        color.a = (Player.Get().CanStartBodyInspection() ? ((!BodyInspectionController.Get().IsActive()) ? this.m_NormalAlpha : this.m_SelectedAlpha) : this.m_InactiveAlpha);
        this.m_Inspect.color = color;
    }
Exemple #9
0
 private void OnNotebook()
 {
     if (NotepadController.Get().IsActive())
     {
         NotepadController.Get().Hide();
     }
     else
     {
         if (MenuNotepad.Get().m_ActiveTab == MenuNotepad.MenuNotepadTab.PlannerTab)
         {
             HUDPlanner.Get().m_PlannerMode = PlannerMode.ReadOnly;
         }
         if (Inventory3DManager.Get().IsActive())
         {
             Inventory3DManager.Get().Deactivate();
         }
         Player.Get().StartController(PlayerControllerType.Notepad);
     }
 }
 public void OnNotepad(GameObject obj)
 {
     if (!Player.Get().CanShowNotepad())
     {
         return;
     }
     if (Inventory3DManager.Get().gameObject.activeSelf)
     {
         Inventory3DManager.Get().Deactivate();
     }
     if (BodyInspectionController.Get().IsActive())
     {
         Player.Get().StopController(PlayerControllerType.BodyInspection);
     }
     if (!NotepadController.Get().IsActive())
     {
         Player.Get().StartController(PlayerControllerType.Notepad);
         return;
     }
     NotepadController.Get().Hide();
 }
Exemple #11
0
    protected override void OnShow()
    {
        base.OnShow();
        Player.Get().BlockRotation();
        CursorManager.Get().ShowCursor(true);
        Vector3 position = base.gameObject.transform.position;

        CursorManager.Get().SetCursorPos(position);
        for (int i = 0; i < 6; i++)
        {
            if (!this.IsSlotActive((HUDWheel.HUDWheelSlot)i))
            {
                this.m_Icons[i].color = this.m_InactiveColor;
            }
            else
            {
                this.m_Icons[i].color = this.m_ActiveColor;
            }
        }
        if (Inventory3DManager.Get().IsActive())
        {
            Inventory3DManager.Get().Deactivate();
        }
        if (BodyInspectionController.Get().IsActive())
        {
            BodyInspectionController.Get().Hide();
        }
        if (NotepadController.Get().IsActive())
        {
            NotepadController.Get().Hide();
        }
        if (MapController.Get().IsActive())
        {
            MapController.Get().Hide();
        }
    }
 protected override bool ShouldShow()
 {
     return(this.m_Datas.Count > 0 && !MapController.Get().IsActive() && !NotepadController.Get().IsActive());
 }
Exemple #13
0
 protected override bool ShouldShow()
 {
     return(!NotepadController.Get().IsActive() && !MapController.Get().IsActive() && !Inventory3DManager.Get().gameObject.activeSelf);
 }
 protected override bool ShouldShow()
 {
     return(this.m_ActiveSlots.Count > 0 && !MapController.Get().IsActive() && !NotepadController.Get().IsActive() && !ScenarioManager.Get().IsDreamOrPreDream());
 }
Exemple #15
0
 protected override bool ShouldShow()
 {
     return(this.m_DebugActive && this.m_AIs.Count > 0 && !Player.Get().m_DreamActive&& !MapController.Get().IsActive() && !NotepadController.Get().IsActive());
 }
 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);
 }
 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);
 }
Exemple #18
0
 protected override bool ShouldShow()
 {
     return(this.m_Datas.Count > 0 && !MapController.Get().IsActive() && !NotepadController.Get().IsActive() && !CutscenesManager.Get().IsCutscenePlaying() && !ScenarioManager.Get().IsDreamOrPreDream());
 }
Exemple #19
0
 protected override bool ShouldShow()
 {
     return(!Player.Get().IsDead() && !Player.Get().m_DreamActive&& !CutscenesManager.Get().IsCutscenePlaying() && !SleepController.Get().IsActive() && !HUDWheel.Get().enabled&& !Storage3D.Get().IsActive() && !BodyInspectionController.Get().IsBandagingInProgress() && (Inventory3DManager.Get().gameObject.activeSelf || NotepadController.Get().IsActive() || MapController.Get().IsActive() || BodyInspectionController.Get().IsActive()));
 }
Exemple #20
0
 protected override bool ShouldShow()
 {
     return(this.m_Active && (!NotepadController.Get().IsActive() || NotepadController.Get().CanDisable()) && !ScenarioManager.Get().IsDreamOrPreDream());
 }
Exemple #21
0
 private bool CanCrouch()
 {
     return(!Inventory3DManager.Get().IsActive() && !MapController.Get().IsActive() && !NotepadController.Get().IsActive() && !HeavyObjectController.Get().IsActive() && !WalkieTalkieController.Get().IsActive() && !ConstructionController.Get().IsActive() && !HUDItem.Get().m_Active&& !HUDWheel.Get().m_Active);
 }
Exemple #22
0
 protected override bool ShouldShow()
 {
     return(GreenHellGame.Instance.m_Settings.m_Crosshair && !NotepadController.Get().IsActive() && !MapController.Get().IsActive());
 }
Exemple #23
0
 private bool IsSlotActive(HUDNewWheel.HUDWheelSlot slot)
 {
     return((slot != HUDNewWheel.HUDWheelSlot.Craft || Player.Get().CanStartCrafting()) && (slot != HUDNewWheel.HUDWheelSlot.Notebook || NotepadController.Get().IsActive() || Player.Get().CanShowNotepad()) && (slot != HUDNewWheel.HUDWheelSlot.Map || MapController.Get().IsActive() || Player.Get().CanShowMap()) && (slot != HUDNewWheel.HUDWheelSlot.Sleep || Player.Get().CanSleep()) && (slot != HUDNewWheel.HUDWheelSlot.Inspect || BodyInspectionController.Get().IsActive() || Player.Get().CanStartBodyInspection()));
 }
 private bool CanShowMenuInGame()
 {
     return(!GreenHellGame.ROADSHOW_DEMO && !this.m_CurrentScreen && !Inventory3DManager.Get().gameObject.activeSelf&& !NotepadController.Get().enabled&& !MapController.Get().enabled&& !BodyInspectionController.Get().enabled&& !BodyInspectionMiniGameController.Get().enabled&& (!HUDEndDemo.Get() || !HUDEndDemo.Get().enabled) && !CutscenesManager.Get().IsCutscenePlaying() && !HUDStartSurvivalSplash.Get().m_Active);
 }
Exemple #25
0
 public void OnQuit()
 {
     NotepadController.Get().Hide();
 }
Exemple #26
0
 protected override bool ShouldShow()
 {
     return(this.m_Active && (!NotepadController.Get().IsActive() || NotepadController.Get().CanDisable()));
 }
Exemple #27
0
 protected override bool ShouldShow()
 {
     return(!(NotepadController.Get() == null) && NotepadController.Get().IsActive() && MenuNotepad.Get().m_ActiveTab == MenuNotepad.MenuNotepadTab.PlannerTab);
 }
Exemple #28
0
    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);
    }
Exemple #29
0
 public bool CanReceiveAction()
 {
     return(NotepadController.Get().IsActive() && MenuNotepad.Get().m_ActiveTab == this.m_Tab);
 }
 protected override bool ShouldShow()
 {
     return(this.m_Active && this.m_ShowObjectives && !Player.Get().m_DreamActive&& !MapController.Get().IsActive() && !NotepadController.Get().IsActive());
 }