예제 #1
0
 public override void OnExecute(TriggerAction.TYPE action)
 {
     base.OnExecute(action);
     if (action == TriggerAction.TYPE.ClimbHold)
     {
         Player.Get().BlockMoves();
         Player.Get().BlockRotation();
         GreenHellGame.GetFadeSystem().FadeOut(FadeType.All, new VDelegate(this.Teleport), 1.5f, null);
     }
 }
예제 #2
0
 private void UpdateController()
 {
     if (this.m_BlockControllerUpdate)
     {
         return;
     }
     this.m_PadControllerConnected = false;
     string[] joystickNames = Input.GetJoystickNames();
     if (joystickNames.Length != 0)
     {
         int i = 0;
         while (i < joystickNames.Length)
         {
             if (!string.IsNullOrEmpty(joystickNames[i]))
             {
                 this.m_PadControllerConnected = true;
                 if (joystickNames[i].Contains("Wireless") && !joystickNames[i].Contains("Xbox"))
                 {
                     InputsManager.Get().m_PadControllerType = InputsManager.PadControllerType.Ps4;
                     break;
                 }
                 InputsManager.Get().m_PadControllerType = InputsManager.PadControllerType.Xbox;
                 break;
             }
             else
             {
                 i++;
             }
         }
     }
     if (GreenHellGame.IsPadControllerActive() && !this.m_PadControllerConnected)
     {
         GreenHellGame.Instance.m_Settings.m_ControllerType = ControllerType.PC;
         this.OnChangeControllerOption();
     }
     if (this.m_PadControllerConnected && GreenHellGame.IsPCControllerActive() && !this.m_WasPadConstrollerInfo)
     {
         if (MainLevel.Instance && !MainLevel.Instance.IsPause())
         {
             MenuInGameManager.Get().ShowScreen(typeof(MenuInGame));
             this.m_PadConstrollerInfoPause = true;
         }
         this.m_WasPadConstrollerInfo = true;
         GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("YesNoDialog_Info", true), GreenHellGame.Instance.GetLocalization().Get("ControllerDetected_Info", true), false);
     }
     if (this.m_WasPadConstrollerInfo && !this.m_PadControllerConnected)
     {
         this.m_WasPadConstrollerInfo = false;
         return;
     }
     if (this.m_PadControllerConnected && GreenHellGame.IsPadControllerActive())
     {
         this.m_WasPadConstrollerInfo = true;
     }
 }
예제 #3
0
 public override void OnBack()
 {
     if (this.m_OptionsChanged)
     {
         GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("YNDialog_OptionsGame_AcceptTitle"), GreenHellGame.Instance.GetLocalization().Get("YNDialog_OptionsGame_Accept"), false);
     }
     else
     {
         this.m_MenuInGameManager.ShowScreen(typeof(MenuOptions));
     }
 }
 private void UpdateSlots()
 {
     if (GreenHellGame.GetYesNoDialog().gameObject.activeSelf)
     {
         return;
     }
     if (GreenHellGame.IsPCControllerActive())
     {
         this.CheckSelection();
     }
 }
예제 #5
0
    public void OnStartGame()
    {
        LoadingScreen.Get().Show(LoadingScreenState.StartGame);
        GreenHellGame.Instance.m_FromSave = false;
        Music.Get().Stop(1f);
        MainMenuManager.Get().HideAllScreens();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 2f);
        base.Invoke("OnStartGameDelayed", 1f);
    }
예제 #6
0
 private void UpdateReturnToMainMenuLoadingScreen()
 {
     if (LoadingScreen.Get() != null && LoadingScreen.Get().m_Active&& LoadingScreen.Get().m_State == LoadingScreenState.ReturnToMainMenu && SceneManager.GetSceneByName("MainMenu").IsValid())
     {
         FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();
         if (!fadeSystem.m_FadeOut && !fadeSystem.m_FadingOut)
         {
             fadeSystem.FadeOut(FadeType.Vis, new VDelegate(this.OnLoadingEndFadeOut), 1.5f, null);
         }
     }
 }
예제 #7
0
 private void UpdateInputs()
 {
     if (GreenHellGame.GetYesNoDialog().isActiveAndEnabled)
     {
         return;
     }
     if (Input.GetMouseButton(0) && this.m_ActiveButton != null)
     {
         this.OnButtonPressed(this.m_ActiveButton);
     }
 }
예제 #8
0
 public void OnQuit()
 {
     if (DifficultySettings.ActivePreset.m_PermaDeath)
     {
         LoadingScreen.Get().Show(LoadingScreenState.ReturnToMainMenu);
         GreenHellGame.Instance.ReturnToMainMenu();
         return;
     }
     GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("MenuInGame_Quit", true), GreenHellGame.Instance.GetLocalization().Get("MenuInGame_Quit_Question", true), true);
     this.m_YesNoQuestion = HUDDeath.YesNoQuestion.Quit;
 }
예제 #9
0
    private void StopMinigame()
    {
        this.m_SkyDome.gameObject.SetActive(true);
        this.ResetCamera();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 1.5f);
        this.m_Player.SetWantedItem(Hand.Left, null, true);
        this.m_Player.SetWantedItem(Hand.Right, null, true);
        this.Stop();
    }
예제 #10
0
 public override void OnBack()
 {
     if (this.m_Slider.value != this.m_StartVol || this.m_DialogsSlider.value != this.m_StartDialogsVol || this.m_MusicSlider.value != this.m_StartMusicVol || this.m_EnviroSlider.value != this.m_StartEnviroVol || this.m_GeneralSlider.value != this.m_StartGeneralVol)
     {
         GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("YNDialog_OptionsGame_AcceptTitle"), GreenHellGame.Instance.GetLocalization().Get("YNDialog_OptionsGame_Accept"), false);
     }
     else
     {
         this.m_MenuInGameManager.ShowScreen(typeof(MenuOptions));
     }
 }
예제 #11
0
    protected override void OnShow()
    {
        base.OnShow();
        if (!this.m_HUDTriggerAttach)
        {
            this.m_HUDTriggerAttach = HUDTrigger.GetNormal().transform.Find("Group/Action_0/KeyFrame0");
        }
        Player.Get().BlockRotation();
        Player.Get().BlockMoves();
        this.m_PadHideCursorPos = Vector2.zero;
        if (GreenHellGame.IsPCControllerActive())
        {
            CursorManager.Get().ShowCursor(CursorManager.TYPE.Normal);
            this.m_CursorVisible = true;
        }
        else if (Inventory3DManager.Get().IsActive() && CursorManager.Get().IsCursorVisible())
        {
            this.m_PadHideCursorPos = Input.mousePosition;
            CursorManager.Get().ShowCursor(false, false);
            this.m_CursorVisible = false;
        }
        Vector3 zero = Vector3.zero;

        if (!Inventory3DManager.Get().gameObject.activeSelf)
        {
            zero.x = (float)Screen.width * this.m_CursorOffset.x;
            zero.y = (float)Screen.height * this.m_CursorOffset.y;
            CursorManager.Get().SetCursorPos(this.m_HUDTriggerAttach.position + zero);
        }
        zero.x = (float)Screen.width * this.m_Offset.x;
        zero.y = (float)Screen.height * this.m_Offset.y;
        base.transform.position = this.m_HUDTriggerAttach.position + zero;
        this.ShowElements();
        float a  = float.MaxValue;
        float a2 = float.MaxValue;
        float a3 = float.MinValue;
        float a4 = float.MinValue;

        foreach (HUDItemButton huditemButton in this.m_ActiveButtons)
        {
            Vector3[] array = new Vector3[4];
            huditemButton.trans.GetWorldCorners(array);
            Vector2[] array2 = new Vector2[4];
            for (int i = 0; i < 4; i++)
            {
                array2[i] = RectTransformUtility.WorldToScreenPoint(base.transform.GetComponentInParent <Canvas>().worldCamera, array[i]);
                a         = Mathf.Min(a, array2[i].x);
                a3        = Mathf.Max(a3, array2[i].x);
                a2        = Mathf.Min(a2, array2[i].y);
                a4        = Mathf.Max(a4, array2[i].y);
            }
        }
    }
예제 #12
0
	public virtual void SetupController()
	{
		bool flag = GreenHellGame.IsPadControllerActive();
		foreach (GameObject gameObject in this.m_PadDisableElements)
		{
			gameObject.SetActive(!flag && base.enabled);
		}
		foreach (GameObject gameObject2 in this.m_PadEnableElements)
		{
			gameObject2.SetActive(flag && base.enabled);
		}
	}
예제 #13
0
    private void UpdateVis()
    {
        Color color = Color.white;
        bool  flag  = PlayerWalkieTalkieModule.Get().CanCall();

        if (GreenHellGame.IsPCControllerActive())
        {
            using (List <HUDSelectDialogElemData> .Enumerator enumerator = this.m_Datas.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    HUDSelectDialogElemData hudselectDialogElemData = enumerator.Current;
                    if (flag && RectTransformUtility.RectangleContainsScreenPoint(hudselectDialogElemData.m_BG.rectTransform, Input.mousePosition))
                    {
                        this.m_MarkedData = hudselectDialogElemData;
                        hudselectDialogElemData.m_BG.gameObject.SetActive(true);
                    }
                    else
                    {
                        hudselectDialogElemData.m_BG.gameObject.SetActive(false);
                    }
                    color   = hudselectDialogElemData.m_Text.color;
                    color.a = (flag ? 1f : this.m_InactiveAlpha);
                    hudselectDialogElemData.m_Text.color = color;
                }
                goto IL_194;
            }
        }
        if (this.m_PadSelectionIndex < 0)
        {
            this.m_PadSelectionIndex = 0;
        }
        for (int i = 0; i < this.m_Datas.Count; i++)
        {
            HUDSelectDialogElemData hudselectDialogElemData2 = this.m_Datas[i];
            if (flag && i == this.m_PadSelectionIndex)
            {
                this.m_MarkedData = hudselectDialogElemData2;
                hudselectDialogElemData2.m_BG.gameObject.SetActive(true);
            }
            else
            {
                hudselectDialogElemData2.m_BG.gameObject.SetActive(false);
            }
            hudselectDialogElemData2.m_PadIconSelect.SetActive(hudselectDialogElemData2.m_BG.gameObject.activeSelf);
            color   = hudselectDialogElemData2.m_Text.color;
            color.a = (flag ? 1f : this.m_InactiveAlpha);
            hudselectDialogElemData2.m_Text.color = color;
        }
IL_194:
        this.UpdateHeaderText();
    }
 protected override void Update()
 {
     base.Update();
     this.UpdateSlots();
     if (!GreenHellGame.IsYesNoDialogActive())
     {
         CursorManager.Get().SetCursor(((this.m_ActiveMenuOption != null && this.m_ActiveMenuOption.m_Button != null) || this.m_HLSlotIdx >= 0) ? CursorManager.TYPE.MouseOver : CursorManager.TYPE.Normal);
     }
     if (GreenHellGame.IsPadControllerActive())
     {
         CursorManager.Get().SetCursorPos(Vector2.zero);
     }
 }
예제 #15
0
    public void Respawn()
    {
        this.m_InjuryModule.ResetInjuries();
        this.m_ConditionModule.ResetParams();
        this.m_Player.GetComponent <SleepController>().UpdateLastWakeUpTime();
        SaveGame.Load();
        this.m_Animator.SetBool(this.m_IsDeadHash, false);
        this.m_Animator.SetBool(this.m_IsDeadUnderwaterHash, false);
        this.Stop();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 1.5f);
    }
예제 #16
0
 public void OnStartSurvival()
 {
     if (!this.m_ButtonsActive)
     {
         return;
     }
     if (GreenHellGame.Instance.m_Settings.m_NeverPlayed)
     {
         GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("MenuYesNoDialog_Warning", true), GreenHellGame.Instance.GetLocalization().Get("MainMenu_FirstTimeNoTutorial", true), !this.m_IsIngame);
         return;
     }
     this.StartSurvival();
 }
예제 #17
0
 public void SetActiveScreen(Type screen_type, bool with_fade = true)
 {
     if (with_fade)
     {
         this.m_ScreenToShow = screen_type;
         FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();
         fadeSystem.FadeOut(FadeType.All, new VDelegate(this.OnFadOutEnd), 4f, null);
     }
     else
     {
         this.SetActiveScreenInternal(screen_type);
     }
 }
 private void UpdateInputs()
 {
     if (this.m_Player.GetRotationBlocked())
     {
         return;
     }
     this.m_Inputs.m_Dir = Vector2.zero;
     if (GreenHellGame.IsPCControllerActive())
     {
         if (InputsManager.Get().IsActionActive(InputsManager.InputAction.Forward))
         {
             this.m_Inputs.m_Dir.y = 1f;
         }
         else if (InputsManager.Get().IsActionActive(InputsManager.InputAction.Backward))
         {
             this.m_Inputs.m_Dir.y = -1f;
         }
         if (InputsManager.Get().IsActionActive(InputsManager.InputAction.Left))
         {
             this.m_Inputs.m_Dir.x = -1f;
             return;
         }
         if (InputsManager.Get().IsActionActive(InputsManager.InputAction.Right))
         {
             this.m_Inputs.m_Dir.x = 1f;
             return;
         }
     }
     else
     {
         float num = 0.5f;
         if (InputsManager.Get().GetActionValue(InputsManager.InputAction.Forward) > num)
         {
             this.m_Inputs.m_Dir.y = 1f;
         }
         else if (InputsManager.Get().GetActionValue(InputsManager.InputAction.Backward) > num)
         {
             this.m_Inputs.m_Dir.y = -1f;
         }
         if (InputsManager.Get().GetActionValue(InputsManager.InputAction.Left) > num)
         {
             this.m_Inputs.m_Dir.x = -1f;
             return;
         }
         if (InputsManager.Get().GetActionValue(InputsManager.InputAction.Right) > num)
         {
             this.m_Inputs.m_Dir.x = 1f;
         }
     }
 }
예제 #19
0
 protected override void OnShow()
 {
     base.OnShow();
     this.m_DetailsActive = false;
     this.m_PageNum       = 0;
     this.m_ReadButton.gameObject.SetActive(false);
     for (int i = 0; i < base.gameObject.transform.childCount; i++)
     {
         if (base.gameObject.transform.GetChild(i).gameObject.name == "HUD_" + this.m_ElementName)
         {
             GameObject gameObject = base.gameObject.transform.GetChild(i).gameObject;
             gameObject.SetActive(true);
             for (int j = 0; j < gameObject.transform.childCount; j++)
             {
                 Text[] componentsInChildren = gameObject.GetComponentsInChildren <Text>();
                 for (int k = 0; k < componentsInChildren.Length; k++)
                 {
                     componentsInChildren[k].text = GreenHellGame.Instance.GetLocalization().Get(componentsInChildren[k].name, true);
                 }
             }
         }
         else if (base.gameObject.transform.GetChild(i).gameObject.name == "HUD_" + this.m_ElementName + "_Details")
         {
             this.m_ReadButton.gameObject.SetActive(true);
             this.m_ReadButton.gameObject.GetComponentInChildren <Text>().text = GreenHellGame.Instance.GetLocalization().Get("HUD_ReadableItem_Details", true);
             base.gameObject.transform.GetChild(i).gameObject.SetActive(false);
         }
         else if (base.gameObject.transform.GetChild(i).gameObject != this.m_ReadButton.gameObject && base.gameObject.transform.GetChild(i).gameObject != this.m_PagePrevButton.gameObject && base.gameObject.transform.GetChild(i).gameObject != this.m_PageNextButton.gameObject)
         {
             base.gameObject.transform.GetChild(i).gameObject.SetActive(false);
         }
     }
     Player.Get().BlockMoves();
     Player.Get().BlockRotation();
     this.m_ScrollValue = 1f;
     if (GreenHellGame.IsPCControllerActive())
     {
         CursorManager.Get().ShowCursor(true, true);
         this.m_CursorVisible = true;
     }
     this.m_PagePrevButton.gameObject.GetComponentInChildren <Text>().text = GreenHellGame.Instance.GetLocalization().Get("HUD_ReadableItem_PrevPage", true);
     this.m_PageNextButton.gameObject.GetComponentInChildren <Text>().text = GreenHellGame.Instance.GetLocalization().Get("HUD_ReadableItem_NextPage", true);
     this.m_PagePrevButton.gameObject.SetActive(false);
     this.m_PageNextButton.gameObject.SetActive(false);
     this.m_QuitButton.gameObject.GetComponentInChildren <Text>().text = GreenHellGame.Instance.GetLocalization().Get("HUD_ReadableItem_Quit", true);
     this.m_QuitButton.gameObject.SetActive(true);
     this.m_ReadButton.GetComponentInChildren <Text>().text    = GreenHellGame.Instance.GetLocalization().Get("HUD_ReadableItem_Details", true);
     this.m_ReadButtonPad.GetComponentInChildren <Text>().text = GreenHellGame.Instance.GetLocalization().Get("HUD_ReadableItem_DetailsPad", true);
     this.m_PadScrollIcon.SetActive(false);
 }
예제 #20
0
 private void UpdateLoading()
 {
     if (LoadingScreen.Get() != null && LoadingScreen.Get().m_Active&& LoadingScreen.Get().m_State != LoadingScreenState.ReturnToMainMenu)
     {
         bool flag = true;
         if (Time.unscaledTime - Player.Get().GetTeleportTime() < 1f)
         {
             flag = false;
         }
         if (this.m_Streamers.Count > 0)
         {
             for (int i = 0; i < this.m_Streamers.Count; i++)
             {
                 if (this.m_Streamers[i].IsSomethingToLoad())
                 {
                     flag = false;
                     break;
                 }
             }
         }
         if (flag)
         {
             this.m_HideLoadingScreenFrameCount++;
         }
         if (GreenHellGame.Instance.m_LoadGameState == LoadGameState.PreloadScheduled)
         {
             SaveGame.PlayerLoad();
         }
         else if (GreenHellGame.Instance.m_LoadGameState == LoadGameState.PreloadCompleted)
         {
             GreenHellGame.Instance.m_LoadGameState = LoadGameState.FullLoadScheduled;
         }
         else if (this.m_HideLoadingScreenFrameCount > 5 && GreenHellGame.Instance.m_LoadGameState == LoadGameState.FullLoadScheduled)
         {
             SaveGame.FullLoad();
         }
         else if (GreenHellGame.Instance.m_LoadGameState == LoadGameState.FullLoadCompleted)
         {
             GreenHellGame.Instance.m_LoadGameState = LoadGameState.None;
         }
         if (this.m_HideLoadingScreenFrameCount > 5 && GreenHellGame.Instance.m_LoadGameState == LoadGameState.None)
         {
             FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();
             if (!fadeSystem.m_FadeIn && !fadeSystem.m_FadingIn)
             {
                 fadeSystem.FadeOut(FadeType.All, new VDelegate(this.OnLoadingEndFadeOut), 2f, null);
             }
         }
     }
 }
예제 #21
0
        protected override void OnLoadGame()
        {
            LoadingScreen.Get().Show(LoadingScreenState.StartGame);
            GreenHellGame.Instance.m_FromSave = true;

            if (Music.Get().m_Source[0])
            {
                Music.Get().m_Source[0].Stop();                 // <- Changed from fade out to direct stop
            }
            HideAllScreens();
            GreenHellGame.GetFadeSystem().FadeIn(FadeType.All, null, 2f);

            OnStartGameDelayed();             // <- Changed from Invoke to direct method call
        }
예제 #22
0
 protected override void OnSlotSelected(int slot_idx)
 {
     if (this.m_WaitingForDecision)
     {
         return;
     }
     if (this.m_Slots[slot_idx].m_Empty)
     {
         return;
     }
     this.m_SlotIdx = slot_idx;
     GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("MenuYesNoDialog_Warning"), GreenHellGame.Instance.GetLocalization().Get("MenuLoadGame_Confirm"), false);
     this.m_WaitingForDecision = true;
 }
예제 #23
0
 protected override void Update()
 {
     if (GreenHellGame.GetYesNoDialog().gameObject.activeSelf)
     {
         return;
     }
     base.Update();
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         this.OnBack();
         return;
     }
     if (InputsManager.Get().IsActionActive(InputsManager.InputAction.Right))
     {
         if (this.m_ActiveMenuOption != null && this.m_ActiveMenuOption.m_Slider)
         {
             float actionValue = InputsManager.Get().GetActionValue(InputsManager.InputAction.Right);
             if (actionValue > 0.3f)
             {
                 this.m_ActiveMenuOption.m_Slider.value += (this.m_ActiveMenuOption.m_Slider.maxValue - this.m_ActiveMenuOption.m_Slider.minValue) * actionValue * Time.unscaledDeltaTime;
                 return;
             }
         }
     }
     else if (InputsManager.Get().IsActionActive(InputsManager.InputAction.Left))
     {
         if (this.m_ActiveMenuOption != null && this.m_ActiveMenuOption.m_Slider)
         {
             float actionValue2 = InputsManager.Get().GetActionValue(InputsManager.InputAction.Left);
             if (actionValue2 > 0.3f)
             {
                 this.m_ActiveMenuOption.m_Slider.value -= (this.m_ActiveMenuOption.m_Slider.maxValue - this.m_ActiveMenuOption.m_Slider.minValue) * actionValue2 * Time.unscaledDeltaTime;
                 return;
             }
         }
     }
     else if (InputsManager.Get().IsActionActive(InputsManager.InputAction.DPadRight))
     {
         if (this.m_ActiveMenuOption != null && this.m_ActiveMenuOption.m_Slider)
         {
             this.m_ActiveMenuOption.m_Slider.value += (this.m_ActiveMenuOption.m_Slider.maxValue - this.m_ActiveMenuOption.m_Slider.minValue) * Time.unscaledDeltaTime;
             return;
         }
     }
     else if (InputsManager.Get().IsActionActive(InputsManager.InputAction.DPadLeft) && this.m_ActiveMenuOption != null && this.m_ActiveMenuOption.m_Slider)
     {
         this.m_ActiveMenuOption.m_Slider.value -= (this.m_ActiveMenuOption.m_Slider.maxValue - this.m_ActiveMenuOption.m_Slider.minValue) * Time.unscaledDeltaTime;
     }
 }
예제 #24
0
    public void OnLoadingEndFadeOut()
    {
        LoadingScreen.Get().Hide();
        this.m_HideLoadingScreenFrameCount = 0;
        this.StartRainForestAmbienceMultisample();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 2f);
        if (Player.Get().m_MovesBlockedOnChangeScene)
        {
            Player.Get().UnblockMoves();
            Player.Get().m_MovesBlockedOnChangeScene = false;
        }
        Player.Get().SetupActiveController();
    }
예제 #25
0
 public void OnYesFromDialog()
 {
     if (this.m_Question == OptionsGameQuestion.Back)
     {
         MainMenuManager.Get().SetActiveScreen(typeof(MainMenuOptions), true);
     }
     else if (this.m_Question == OptionsGameQuestion.Accept)
     {
         this.ApplySettings();
         GreenHellGame.Instance.m_Settings.SaveSettings();
         GreenHellGame.Instance.m_Settings.ApplySettings();
         this.ApplyLocalization();
         GreenHellGame.GetYesNoDialog().ApplyLanguage();
     }
 }
예제 #26
0
    public override void OnShow()
    {
        base.OnShow();
        if (GreenHellGame.IsPadControllerActive())
        {
            CursorManager.Get().ShowCursor(true, false);
        }
        Transform transform = base.transform.FindDeepChild("DebugSpawn");

        if (transform == null)
        {
            return;
        }
        transform.gameObject.SetActive(false);
    }
예제 #27
0
 protected override void OnSlotSelected(int slot_idx)
 {
     this.m_SlotIdx = slot_idx;
     if (!this.m_Slots[slot_idx].m_Empty)
     {
         GreenHellGame.GetYesNoDialog().Show(this, DialogWindowType.YesNo, GreenHellGame.Instance.GetLocalization().Get("MenuYesNoDialog_Warning"), GreenHellGame.Instance.GetLocalization().Get("MenuSaveGame_OverwriteWarning"), true);
         this.m_Loading = true;
     }
     else
     {
         SaveGame.s_MainSaveName = "Slot" + this.m_SlotIdx.ToString() + ".sav";
         base.Invoke("OnPreStartGame", 0.3f);
         this.m_Loading = true;
     }
 }
예제 #28
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();
 }
예제 #29
0
    private void UpdateState()
    {
        switch (this.m_State)
        {
        case ItemController.State.None:
            this.SetAnimatorParameters();
            return;

        case ItemController.State.Swing:
        case ItemController.State.Throw:
            break;

        case ItemController.State.FinishSwing:
            this.SetState(ItemController.State.None);
            return;

        case ItemController.State.Aim:
            if (this.m_Item.m_Info.IsStone())
            {
                if (GreenHellGame.IsPCControllerActive() && !InputsManager.Get().IsActionActive(InputsManager.InputAction.ThrowStone) && Player.Get().CanThrowStone())
                {
                    this.SetState(ItemController.State.Throw);
                    return;
                }
            }
            else if (!InputsManager.Get().IsActionActive(InputsManager.InputAction.ItemAim) || TriggerController.Get().IsGrabInProgress() || Inventory3DManager.Get().gameObject.activeSelf)
            {
                this.SetState(ItemController.State.None);
                return;
            }
            break;

        case ItemController.State.StoneAim:
            if (GreenHellGame.IsPCControllerActive() && this.m_Animator.GetCurrentAnimatorStateInfo(this.m_SpineLayerIndex).shortNameHash == this.m_ObjectAimHash && !this.m_Animator.IsInTransition(this.m_SpineLayerIndex) && !InputsManager.Get().IsActionActive(InputsManager.InputAction.ThrowStone))
            {
                Camera mainCamera = CameraManager.Get().m_MainCamera;
                Player.Get().m_StopAimCameraMtx.SetColumn(0, mainCamera.transform.right);
                Player.Get().m_StopAimCameraMtx.SetColumn(1, mainCamera.transform.up);
                Player.Get().m_StopAimCameraMtx.SetColumn(2, mainCamera.transform.forward);
                Player.Get().m_StopAimCameraMtx.SetColumn(3, mainCamera.transform.position);
                this.SetState(ItemController.State.Throw);
            }
            break;

        default:
            return;
        }
    }
예제 #30
0
 public override void SetupController()
 {
     base.SetupController();
     if (this.m_ActiveHint != null)
     {
         if (GreenHellGame.IsPCControllerActive())
         {
             this.m_Text.text = this.m_ActiveHint.m_LocalizedText;
         }
         else
         {
             this.SetupPadText();
         }
         this.UpdateBackground();
     }
 }