Соединение всё со всем что имеется, дописывание стейт-машины

Теперь мне удобно кастить и получать тип камеры, всё вроде работает нормисно
This commit is contained in:
MrTorex committed 2025-10-29 01:02:02 +03:00
1 parent 4549617275
commit 665114b7dc
28 files changed
+292 -598

No files matched your search

@@ -1,16 +1,13 @@
using Code.App.StateMachine;
using Code.Gameplay.Camera;
using Code.Gameplay.Player;
using Code.Input;
using Code.Scenes;
using Code.StateMachine;
using UnityEngine;
namespace Code.App.AppStates
{
public class GameplayState : BaseState<AppStateMachineContext>
{
private PlayerHealth _playerHealthPoints;
public GameplayState(AppStateMachineContext context) : base(context)
{
@@ -21,9 +18,6 @@ namespace Code.App.AppStates
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);
}
@@ -16,17 +16,11 @@ namespace Code.App.AppStates
Context.SceneLoaderService.LoadScene((int)SceneIds.MainMenu, SceneLoaded);
Context.InputService.EnableMap(ActionMappings.MainMenu);
Context.UIService.LoadingScreen.Show();
Context.UIService.SwitchPanelTo(UIPanel.MainMenu);
((MainMenuPanel)Context.UIService.CurrentPanel).startButton.onClick.AddListener(StartGame);
((MainMenuPanel)Context.UIService.CurrentPanel).exitButton.onClick.AddListener(ExitGame);
Context.CameraStateMachine.SwitchState(CameraMode.Static);
}
private void SceneLoaded()
{
Context.UIService.LoadingScreen.Hide();
base.EnterState();
}
@@ -1,4 +1,5 @@
using Code.App.StateMachine;
using Code.Gameplay.Camera;
using Code.Input;
using Code.Scenes;
using Code.StateMachine;
@@ -16,6 +17,8 @@ namespace Code.App.AppStates
{
Context.SceneLoaderService.LoadScene((int)SceneIds.MovementDev, SceneLoaded);
Context.InputService.EnableMap(ActionMappings.Gameplay);
Context.CameraStateMachine.SwitchState(CameraMode.FirstPerson);
}
private void SceneLoaded()