Essentials + extra crap

Loadings
Startups
Movement
Camera
This commit is contained in:
ThomasCharester committed 2026-01-12 18:43:51 +03:00
1 parent 662f4a1d05
commit 5f5ace1b52
734 files changed
+107323 -1713

No files matched your search

@@ -0,0 +1,49 @@
// <auto-generated/>
#pragma warning disable CS0105
using Code.Infrastructure.StateMachine;
using Code.Infrastructure.App.States;
using Code.Infrastructure.App.States;
using Code.Infrastructure.App.States;
#pragma warning restore CS0105
namespace Code.Infrastructure.App
{
public partial class AppStateMachine : AbstractStateMachine<Code.Infrastructure.App.AppStates,Code.Infrastructure.App.AppStateMachineContext>
{
public AppStateMachine(Code.Infrastructure.App.AppStateMachineContext context, EventBus.EventBus eventBus) : base(context)
{
var stateBootstrapState = new BootstrapState(StateMachineContext,eventBus);
States.Add(stateBootstrapState.myState, stateBootstrapState);
var stateGameplayState = new GameplayState(StateMachineContext,eventBus);
States.Add(stateGameplayState.myState, stateGameplayState);
var stateMainMenuState = new MainMenuState(StateMachineContext,eventBus);
States.Add(stateMainMenuState.myState, stateMainMenuState);
}
protected override bool CheckTransitionAllowed(Code.Infrastructure.App.AppStates nextState) => AllowedStates.HasFlag(nextState);
protected override void ResetAllowedTransitions() => AllowedStates = 0;
}
public static class AppStateMachineExtensions
{
public static AbstractStateMachine<Code.Infrastructure.App.AppStates, Code.Infrastructure.App.AppStateMachineContext> AllowStateTransition(
this AbstractStateMachine<Code.Infrastructure.App.AppStates, Code.Infrastructure.App.AppStateMachineContext> stateMachine, Code.Infrastructure.App.AppStates state)
{
if (stateMachine == null) return null;
stateMachine.AllowedStates |= state;
return stateMachine;
}
}
}