Добавлена камера, обновлены инпут мапы и ещё чуть-чуть штук для теста (включая кринжовую сцену, стейт машины и др.)
This commit is contained in:
1 parent
b5e28c7abb
commit
86c9c126a6
20 files changed
+1062
-16
No files matched your search
@@ -0,0 +1,38 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
//TODO: поменяно для теста
|
||||
public class MovementDevState: BaseState<AppStateMachineContext>
|
||||
{
|
||||
public MovementDevState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.SceneLoaderService.LoadScene((int)SceneIds.MovementDev, SceneLoaded);
|
||||
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
||||
}
|
||||
|
||||
private void SceneLoaded()
|
||||
{
|
||||
|
||||
base.EnterState();
|
||||
}
|
||||
|
||||
public override void Tick()
|
||||
{
|
||||
}
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||
|
||||
base.ExitState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 395d8d3979124f10897c28bae62b288a
|
||||
timeCreated: 1760638654
|
||||
@@ -51,10 +51,10 @@ namespace Code.App
|
||||
appStateMachine.Initialize();
|
||||
|
||||
AttributeInjector.Inject(appStateMachine.StateMachineContext, container);
|
||||
|
||||
|
||||
// TODO: поменяно для теста
|
||||
appStateMachine
|
||||
.SwitchState(AppState.MainMenu)
|
||||
.AllowStateTransition(AppState.Gameplay);
|
||||
.SwitchState(AppState.MovementDev);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ namespace Code.App.StateMachine
|
||||
Bootstrap = 1,
|
||||
MainMenu = 2,
|
||||
Gameplay = 4,
|
||||
GameOver = 8
|
||||
GameOver = 8,
|
||||
// TODO: поменяно для теста
|
||||
MovementDev = 52
|
||||
}
|
||||
}
|
||||
@@ -10,9 +10,12 @@ namespace Code.App.StateMachine
|
||||
States.Add(AppState.MainMenu, new MainMenuState(StateMachineContext));
|
||||
States.Add(AppState.Gameplay, new GameplayState(StateMachineContext));
|
||||
States.Add(AppState.GameOver, new GameOverState(StateMachineContext));
|
||||
//TODO: Для теста
|
||||
States.Add(AppState.MovementDev, new MovementDevState(StateMachineContext));
|
||||
|
||||
AllowedStates |= AppState.MainMenu;
|
||||
AllowedStates |= AppState.Gameplay;
|
||||
AllowedStates |= AppState.MovementDev;
|
||||
}
|
||||
|
||||
protected override bool CheckTransitionAllowed(AppState nextState) => AllowedStates.HasFlag(nextState);
|
||||
|
||||
Reference in new issue
Block a user