Теперь камера - это стейт-машина
This commit is contained in:
1 parent
db541fed8a
commit
4549617275
31 files changed
+1145
-210
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Gameplay.Player;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
@@ -16,8 +18,13 @@ namespace Code.App.AppStates
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.SceneLoaderService.LoadScene((int)SceneIds.Gameplay, SceneLoaded);
|
||||
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()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Gameplay.Camera;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
@@ -14,11 +15,18 @@ 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();
|
||||
Context.UIService.LoadingScreen.Hide();
|
||||
|
||||
base.EnterState();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user