sega 8a6d23b77d Реорг Scripts
Разделено на 4 модуля
- Menu
- Gameplay
- Settings
- Common
2026-07-15 10:49:55 +03:00

15 lines
311 B
C#

using UnityEngine;
public class GameStateMachine : MonoBehaviour
{
public IState currentState;
public void ChangeState(IState nextState)
{
currentState?.exit();
currentState = nextState;
currentState.enter();
}
private void Update() => currentState?.update();
}