private void OnPreStartGame() { FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.FadeOut(FadeType.All, new VDelegate(this.OnStartGame), 2f, null); CursorManager.Get().ShowCursor(false); }
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 void FadeOut() { if (SaveGame.m_State == SaveGame.State.None) { FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.FadeOut(FadeType.All, null, 1.5f, null); } }
public override void OnInputAction(InputsManager.InputAction action) { if ((action == InputsManager.InputAction.Quit || action == InputsManager.InputAction.AdditionalQuit) && GreenHellGame.GetFadeSystem().CanStartFade()) { FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.FadeOut(FadeType.All, new VDelegate(this.StopMinigame), 1.5f, null); } }
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); } }
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; }
public override void OnExecute(TriggerAction.TYPE action) { base.OnExecute(action); if (action == TriggerAction.TYPE.ClimbHold) { Player.Get().BlockMoves(); Player.Get().BlockRotation(); FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.FadeOut(FadeType.All, new VDelegate(this.Teleport), 1.5f, null); } }
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); } } }
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 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); } } } }
protected override void OnEnable() { base.OnEnable(); FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.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(); }
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; }
public void StartRespawn() { FadeSystem fadeSystem = GreenHellGame.GetFadeSystem(); fadeSystem.FadeOut(FadeType.All, new VDelegate(this.Respawn), 1.5f, null); }