public void AbortFlight() { pauseScreen.SetActive(false); CanvasCoordinator.SetHudInteractable(false); Player.Kill(); ResetAndGoToShop(); }
public void StartNewFlight() { GameState.CoinValue = 1; GameState.DifficultyLevel = 1; Player.State.Refresh(); Player.Revive(); potionEffects.RefreshButtonInteractable(); CanvasCoordinator.SetHudInteractable(true); AudioClipPlayer.FadeFromMenuToInGameMusic(); manaBarConstructor.UpdateManaBarSize(); UnityAction onHudShown = () => { if (PlayerSettings.HasSeenControlsTutorial) { GameState.IsPaused = false; isFlightActive = true; } else { TutorialCoordinator.ActivateTiltTutorial(); } }; CanvasCoordinator.HideMenuesAndShowHud(onHudShown); }
public static void OnPlayerDeath(bool payRespects = true) { CanvasCoordinator.SetHudInteractable(false); AudioClipPlayer.PlayDeath(); s_instance.cameraShake.Shake(); if (payRespects) { var coroutine = PayRespects(2f, s_instance.ResetAndGoToShop); s_instance.StartCoroutine(coroutine); } else { s_instance.ResetAndGoToShop(); } }