33 lines
649 B
C#
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);
|
|
|
|
}
|
|
}
|
|
} |