Пример #1
0
 private void Teleport()
 {
     Player.Get().Reposition(this.m_TeleportPos.transform.position, null);
     Player.Get().UnblockMoves();
     Player.Get().UnblockRotation();
     GreenHellGame.GetFadeSystem().FadeIn(FadeType.All, null, 1.5f);
 }
Пример #2
0
    private void OnFadOutEnd()
    {
        this.SetActiveScreenInternal(this.m_ScreenToShow);
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 4f);
    }
Пример #3
0
    private void OnPreStartGame()
    {
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeOut(FadeType.All, new VDelegate(this.OnStartGame), 2f, null);
        CursorManager.Get().ShowCursor(false);
    }
Пример #4
0
    public void OnLoadingEndFadeOut()
    {
        LoadingScreen.Get().Hide();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.Vis, null, 1.5f);
    }
Пример #5
0
    private void LoadGame()
    {
        SaveGame.Load("Slot" + this.m_SlotIdx.ToString() + ".sav");
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeOut(FadeType.All, new VDelegate(this.OnLoadGameEnd), 1f, null);
    }
 public override void OnInputAction(InputActionData action_data)
 {
     if ((action_data.m_Action == InputsManager.InputAction.Quit || action_data.m_Action == InputsManager.InputAction.AdditionalQuit) && GreenHellGame.GetFadeSystem().CanStartFade())
     {
         GreenHellGame.GetFadeSystem().FadeOut(FadeType.All, new VDelegate(this.StopMinigame), 1.5f, null);
     }
 }
Пример #7
0
    private void StartMinigame()
    {
        this.SetCamera();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 1.5f);
        this.m_SkyDome.gameObject.SetActive(false);
    }
Пример #8
0
 public void FadeIn()
 {
     if (SaveGame.m_State == SaveGame.State.None)
     {
         FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();
         fadeSystem.FadeIn(FadeType.All, null, 1.5f);
     }
 }
 private void StopMinigame()
 {
     this.m_SkyDome.gameObject.SetActive(true);
     this.ResetCamera();
     GreenHellGame.GetFadeSystem().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
    private void Teleport()
    {
        Player.Get().gameObject.transform.position = this.m_TeleportPos.transform.position;
        Player.Get().UnblockMoves();
        Player.Get().UnblockRotation();
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 1.5f);
    }
Пример #11
0
 public void FadeOutWithScreen(string prefab_name)
 {
     if (SaveGame.m_State == SaveGame.State.None)
     {
         FadeSystem fadeSystem    = GreenHellGame.GetFadeSystem();
         GameObject screen_prefab = Resources.Load <GameObject>("Prefabs/Systems/" + prefab_name);
         fadeSystem.FadeOut(FadeType.All, null, 1.5f, screen_prefab);
     }
 }
Пример #12
0
 private void OnLoadGame()
 {
     LoadingScreen.Get().Show(LoadingScreenState.StartGame);
     GreenHellGame.Instance.m_FromSave = true;
     Music.Get().Stop(1f, 0);
     this.HideAllScreens();
     GreenHellGame.GetFadeSystem().FadeIn(FadeType.All, null, 2f);
     base.Invoke("OnStartGameDelayed", 1f);
 }
Пример #13
0
 private void OnStartGame()
 {
     DifficultySettings.SetActivePresetType(DifficultySettings.PresetType.Hard);
     LoadingScreen.Get().Show(LoadingScreenState.StartGame);
     GreenHellGame.Instance.m_FromSave = false;
     Music.Get().Stop(1f, 0);
     GreenHellGame.GetFadeSystem().FadeIn(FadeType.All, null, 2f);
     base.Invoke("OnStartGameDelayed", 1f);
     MainMenuManager.Get().HideAllScreens();
 }
Пример #14
0
    public void OnYesFromDialog()
    {
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeOut(FadeType.All, new VDelegate(this.OnLoadGame), 1f, null);
        this.m_MenuInGameManager.HideMenu();
        CursorManager.Get().ShowCursor(false);
        this.m_Loading            = true;
        this.m_WaitingForDecision = false;
    }
Пример #15
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);
     }
 }
Пример #16
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);
         }
     }
 }
Пример #17
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);
    }
Пример #18
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);
    }
Пример #19
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);
     }
 }
Пример #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
    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();
    }
 protected override void OnEnable()
 {
     base.OnEnable();
     GreenHellGame.GetFadeSystem().FadeOut(FadeType.All, new VDelegate(this.StartMinigame), 1.5f, null);
     this.m_LHAnimator.SetInteger(this.m_IBIMinigameState, 1);
     this.m_LHAnimator.SetFloat(this.m_FBIMinigameBlend, 0.5f);
     this.m_LHAnimator.speed = 0f;
     this.m_LHAnimator.Play(this.m_LHBlendTreeState, 0, 0f);
     this.m_RHAnimator.SetInteger(this.m_IBIMinigameState, 1);
     this.m_RHAnimator.speed = 0f;
     this.m_RHAnimator.Play(this.m_RHState, 0, 0f);
     this.m_State        = EBIMState.Rotation;
     this.m_CorrectAngle = UnityEngine.Random.Range(-30f, 30f);
     this.m_Worm.SetActive(true);
     this.m_CurrentWormState = 0;
     Inventory3DManager.Get().Deactivate();
 }
Пример #24
0
 public void Respawn()
 {
     this.m_InjuryModule.ResetInjuries();
     this.m_ConditionModule.ResetParams();
     if (ReplTools.IsPlayingAlone())
     {
         SaveGame.Load();
     }
     else
     {
         this.DropInventory();
         this.SpawnOnLastSavePoint();
     }
     this.m_DeathTime = null;
     this.ResetDeathType();
     this.Stop();
     GreenHellGame.GetFadeSystem().FadeIn(FadeType.All, null, 1.5f);
 }
Пример #25
0
    public static void Load(string save_name)
    {
        if (SaveGame.m_State != SaveGame.State.None)
        {
            Debug.LogWarning("Can't load, state = " + SaveGame.m_State.ToString());
            return;
        }
        if (!File.Exists(Application.persistentDataPath + "/" + save_name))
        {
            return;
        }
        GreenHellGame.Instance.m_LoadingScreen.Show(LoadingScreenState.LoadSaveGame);
        GreenHellGame.Instance.m_LoadGameState = LoadGameState.PreloadScheduled;
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        fadeSystem.FadeIn(FadeType.All, null, 2f);
        SaveGame.s_MainSaveName = save_name;
    }
Пример #26
0
 public void OnYesFromDialog()
 {
     SaveGame.s_MainSaveName = this.m_Slots[this.m_SlotIdx].m_SaveInfo.file_name;
     Debug.Log("LoadGameMenu:OnYesFromDialog - " + SaveGame.s_MainSaveName);
     if (this.m_IsIngame)
     {
         GreenHellGame.GetFadeSystem().FadeOut(FadeType.All, new VDelegate(this.OnLoadGame), 0.5f, null);
         this.m_MenuInGameManager.HideMenu();
         if (ConsciousnessController.Get().IsActive())
         {
             ConsciousnessController.Get().Stop();
         }
         CursorManager.Get().ShowCursor(false, false);
         return;
     }
     GreenHellGame.Instance.m_GameMode = this.m_Slots[this.m_SlotIdx].m_GameMode;
     MainMenuManager.Get().CallLoadGameFadeSequence();
     base.EnableSlots(false);
 }
Пример #27
0
 public void SetActiveScreen(Type screen_type, bool with_fade = true)
 {
     if (with_fade)
     {
         this.BlockUIInputs();
         this.m_ScreenToShow = screen_type;
         GreenHellGame.GetFadeSystem().FadeOut(FadeType.All, new VDelegate(this.OnFadOutEnd), 0.3f, null);
     }
     else
     {
         this.SetActiveScreenInternal(screen_type);
     }
     if (this.m_PreviousScreens.Contains(screen_type))
     {
         while (this.m_PreviousScreens.Peek() != screen_type)
         {
             this.m_PreviousScreens.Pop();
         }
         return;
     }
     this.m_PreviousScreens.Push(screen_type);
 }
Пример #28
0
    public bool IsFadeIn()
    {
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        return(fadeSystem.m_FadeIn || fadeSystem.m_FadingIn);
    }
Пример #29
0
    public bool IsFadeOut()
    {
        FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();

        return(fadeSystem.m_FadeOut || fadeSystem.m_FadingOut);
    }
Пример #30
0
 private void UpdateAnimationAndState()
 {
     if (this.m_LMB && !this.m_LastLMB && this.m_State == EBIMState.Rotation)
     {
         this.m_State = EBIMState.SqueezeForward;
     }
     if (this.m_State == EBIMState.Rotation)
     {
         this.m_LHAnimator.speed = 0f;
         this.m_LHAnimator.Play(this.m_LHBlendTreeState, 0, 0f);
         this.m_RHAnimator.speed = 0f;
         this.m_RHAnimator.Play(this.m_RHState, 0, 0f);
         this.m_AnimationFrame = 0f;
         this.m_RHAnimator.Play(this.m_RHState, 0, this.m_AnimationFrame);
         float proportionalClamp = CJTools.Math.GetProportionalClamp(0f, 1f, this.m_MouseAxisX, -30f, 30f);
         this.m_LHAnimator.SetFloat(this.m_FBIMinigameBlend, proportionalClamp);
     }
     else if (this.m_State == EBIMState.SqueezeForward)
     {
         this.m_LHAnimator.speed = 1f;
         this.m_AnimationFrame   = this.m_LHAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime;
         if (this.m_AnimationFrame > 1f)
         {
             this.m_AnimationFrame = 1f;
             this.m_State          = EBIMState.Rotation;
             if (this.m_Result > 0.1f)
             {
                 this.m_CurrentWormState++;
                 if (this.m_CurrentWormState == 3)
                 {
                     this.m_State = EBIMState.PrePresentation;
                 }
             }
             else
             {
                 PlayerSanityModule.Get().OnEvent(PlayerSanityModule.SanityEventType.WormMinigameFail, 1);
             }
         }
         this.m_RHAnimator.Play(this.m_RHState, 0, this.m_AnimationFrame);
     }
     else if (this.m_State == EBIMState.PrePresentation)
     {
         float num = this.m_LHAnimator.GetFloat(this.m_FBIMinigameBlend);
         num += (0.5f - num) * Time.deltaTime * 4f;
         if (Mathf.Abs(num - 0.5f) < 0.05f)
         {
             num = 0.5f;
             this.m_RHAnimator.speed = 1f;
             this.m_RHAnimator.SetInteger(this.m_IBIMinigameState, 2);
             this.m_LHAnimator.speed = 1f;
             this.m_LHAnimator.SetInteger(this.m_IBIMinigameState, 2);
             this.m_State = EBIMState.Presentation;
         }
         this.m_MouseAxisX = CJTools.Math.GetProportionalClamp(-30f, 30f, num, 0f, 1f);
         this.m_LHAnimator.SetFloat(this.m_FBIMinigameBlend, num);
     }
     else if (this.m_State == EBIMState.Presentation)
     {
         AnimatorStateInfo currentAnimatorStateInfo = this.m_RHAnimator.GetCurrentAnimatorStateInfo(0);
         if (currentAnimatorStateInfo.shortNameHash == this.m_GrabWormState && currentAnimatorStateInfo.normalizedTime > 0.2f && this.m_Worm.transform.parent == null)
         {
             Transform parent = this.m_RH.transform.FindDeepChild("HandIndex4.R");
             this.m_Worm.transform.parent = parent;
         }
         if (currentAnimatorStateInfo.shortNameHash == this.m_GrabWormState && currentAnimatorStateInfo.normalizedTime > 0.99f)
         {
             this.m_Player.GetComponent <PlayerInjuryModule>().HealInjury(this.m_Injury);
             this.m_Injury = null;
             FadeSystem fadeSystem = GreenHellGame.GetFadeSystem();
             fadeSystem.FadeOut(FadeType.All, new VDelegate(this.StopMinigame), 1.5f, null);
             this.m_State = EBIMState.Leaving;
             PlayerSanityModule.Get().OnEvent(PlayerSanityModule.SanityEventType.WormMinigameSuccess, 1);
         }
     }
     this.m_LastLMB = this.m_LMB;
 }