chip-game/Assets/Scripts/GameFSM/GameStateMachine.cs
2026-01-12 09:36:17 +03:00

15 lines
304 B
C#

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