Экран смерти, смерть, бабки, Интерфейс, Шлюхи

This commit is contained in:
ThomasCharester committed 2025-11-01 01:45:46 +03:00
1 parent edf3821c0d
commit 019da8cfd3
16 files changed
+278 -60

No files matched your search

@@ -1,6 +1,8 @@
using Code.App.StateMachine;
using Code.Scenes;
using Code.StateMachine;
using Code.UI;
using UnityEngine;
namespace Code.App.AppStates
{
@@ -8,20 +10,32 @@ namespace Code.App.AppStates
{
public GameOverState(AppStateMachineContext context) : base(context)
{ }
private float damnTimer = 3f;
public override void EnterState()
{
Context.UIService.LoadingScreen.Show();
Context.UIService.SwitchPanelTo(UIPanel.GameOver);
base.EnterState();
}
private void ToMainMenu()
{
Context.StateMachine.SwitchState(AppState.MainMenu)
.AllowStateTransition(AppState.Gameplay);
}
public override void Tick()
{ }
{
damnTimer -= Time.deltaTime;
if (damnTimer <= float.Epsilon) ToMainMenu();
}
public override void ExitState()
{
damnTimer = 5f;
Context.UIService.LoadingScreen.Show();
base.ExitState();
}
}