Forest_Client/Forest/Assets/Scripts/Gameplay/Manager/GameStateManager.cs

33 lines
649 B
C#

using Framework.State;
using PhxhSDK;
namespace Gameplay.Manager
{
public class GameStateManager : Singlenton<GameStateManager> , IUpdatable, IInitable
{
private StateMachine _stateMachine;
public void Update(float deltaTime)
{
_stateMachine.Update(deltaTime);
}
public void Init()
{
_stateMachine = new StateMachine();
}
public void Release()
{
_stateMachine = null;
}
public void ChangeState(IState state)
{
_stateMachine.ChangeState(state);
}
}
}