49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using Code.App.StateMachine;
|
|
using Code.Gameplay.Camera;
|
|
using Code.Gameplay.Player;
|
|
using Code.Input;
|
|
using Code.Scenes;
|
|
using Code.StateMachine;
|
|
using Code.UI;
|
|
using UnityEngine;
|
|
|
|
namespace Code.App.AppStates
|
|
{
|
|
public class GameplayState : BaseState<AppStateMachineContext>
|
|
{
|
|
private PlayerHealthPoints _playerHealthPoints;
|
|
|
|
public GameplayState(AppStateMachineContext context) : base(context)
|
|
{
|
|
}
|
|
|
|
public override void EnterState()
|
|
{
|
|
Context.SceneLoaderService.LoadScene((int)SceneIds.MovementDev, SceneLoaded);
|
|
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
|
|
|
Context.UIService.LoadingScreen.Show();
|
|
Context.UIService.SwitchPanelTo(UIPanel.Gameplay);
|
|
|
|
Context.CameraStateMachine.SwitchState(CameraMode.FirstPerson);
|
|
}
|
|
|
|
private void SceneLoaded()
|
|
{
|
|
Context.UIService.LoadingScreen.Hide();
|
|
|
|
base.EnterState();
|
|
}
|
|
|
|
public override void Tick()
|
|
{
|
|
}
|
|
|
|
public override void ExitState()
|
|
{
|
|
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
|
|
|
base.ExitState();
|
|
}
|
|
}
|
|
} |