26 lines
953 B
C#
26 lines
953 B
C#
using Code.Configs;
|
|
using Code.Gameplay.Camera.CameraStates;
|
|
using Code.StateMachine;
|
|
|
|
namespace Code.Gameplay.Camera
|
|
{
|
|
public class CameraStateMachine : AbstractStateMachine<CameraMode, CameraStateMachineContext>
|
|
{
|
|
// Текущий режим работы камеры
|
|
public override void Initialize()
|
|
{
|
|
States.Add(CameraMode.Static, new StaticState(StateMachineContext));
|
|
States.Add(CameraMode.UltraStatic, new UltraStaticState(StateMachineContext));
|
|
States.Add(CameraMode.FirstPerson, new FirstPersonState(StateMachineContext));
|
|
States.Add(CameraMode.ThirdPerson, new ThirdPersonState(StateMachineContext));
|
|
|
|
CurrentBaseState = States[CameraMode.UltraStatic];
|
|
}
|
|
|
|
|
|
protected override bool CheckTransitionAllowed(CameraMode nextState) => true;
|
|
|
|
protected override void ResetAllowedTransitions()
|
|
{ }
|
|
}
|
|
} |