Базовая инфраструктура
This commit is contained in:
1 parent
2e0dc15beb
commit
b5e28c7abb
117 files changed
+2068
-2031
No files matched your search
@@ -0,0 +1,24 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.StateMachine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
public class GameOverState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
public GameOverState(AppStateMachineContext context) : base(context)
|
||||
{ }
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
base.EnterState();
|
||||
}
|
||||
|
||||
public override void Tick()
|
||||
{ }
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
base.ExitState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97314a9736904f47ab06a6744ca2692f
|
||||
timeCreated: 1758640549
|
||||
@@ -0,0 +1,38 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
public class GameplayState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
public GameplayState(AppStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.SceneLoaderService.LoadScene((int)SceneIds.Gameplay, 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: b543b6d48f8b4c37bf3288f57d11dbc9
|
||||
timeCreated: 1758640462
|
||||
@@ -0,0 +1,35 @@
|
||||
using Code.App.StateMachine;
|
||||
using Code.Input;
|
||||
using Code.Scenes;
|
||||
using Code.StateMachine;
|
||||
|
||||
namespace Code.App.AppStates
|
||||
{
|
||||
public class MainMenuState : BaseState<AppStateMachineContext>
|
||||
{
|
||||
public MainMenuState(AppStateMachineContext context) : base(context)
|
||||
{ }
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
Context.SceneLoaderService.LoadScene((int)SceneIds.MainMenu, SceneLoaded);
|
||||
Context.InputService.EnableMap(ActionMappings.MainMenu);
|
||||
}
|
||||
|
||||
private void SceneLoaded()
|
||||
{
|
||||
|
||||
|
||||
base.EnterState();
|
||||
}
|
||||
public override void Tick()
|
||||
{ }
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
Context.InputService.DisableMap(ActionMappings.MainMenu);
|
||||
|
||||
base.ExitState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74975b23ce5e4ba29add02c6406902f5
|
||||
timeCreated: 1758640536
|
||||
Reference in new issue
Block a user