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,38 @@
using Code.Infrastructure.Camera;
using Code.Infrastructure.Generators;
using Code.Infrastructure.SceneLoader;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Code.Infrastructure.App.States
{
[State(typeof(AppStates),typeof(AppStateMachineContext))]
[StateRaisingEvent]
public partial class BootstrapState : IOnGameplaySceneLoadedHandler
{
private EventBus.EventBus _eventBus;
public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
{
_eventBus = eventBus;
}
public override AppStates myState => AppStates.Bootstrap;
protected override void OnEnterState()
{
_eventBus.Subscribe(this);
Context.Camera.SwitchState(CameraMode.FirstPerson).AllowStateTransition(CameraMode.None);
Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
}
protected override void OnExitState()
{
_eventBus.Unsubscribe(this);
}
public void OnGameplaySceneLoaded()
{
Debug.Log("Spermageddon");
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 71df5370ea2e4819bfbdb9cbb8e6c0ab
timeCreated: 1765572469
@@ -0,0 +1,31 @@
using Code.Infrastructure.Camera;
using Code.Infrastructure.Generators;
using Code.Infrastructure.SceneLoader;
using UnityEngine;
namespace Code.Infrastructure.App.States
{
[State(typeof(AppStates),typeof(AppStateMachineContext))]
[StateRaisingEvent]
public partial class GameplayState : IOnGameplaySceneLoadedHandler
{
public GameplayState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
{
}
public override AppStates myState => AppStates.Gameplay;
protected override void OnEnterState()
{
Context.Camera.SwitchState(CameraMode.FirstPerson).AllowStateTransition(CameraMode.None);
}
protected override void OnExitState()
{
}
public void OnGameplaySceneLoaded()
{
Debug.Log("Spermageddon");
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e543193800134f7b858502743ab3a43d
timeCreated: 1766436900
@@ -0,0 +1,22 @@
using Code.Infrastructure.Generators;
namespace Code.Infrastructure.App.States
{
[State(typeof(AppStates),typeof(AppStateMachineContext))]
[StateRaisingEvent]
public partial class MainMenuState
{
public MainMenuState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
{
}
public override AppStates myState => AppStates.MainMenu;
protected override void OnEnterState()
{
}
protected override void OnExitState()
{
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5a17221ff27a400e80c42a2ea60bb4ee
timeCreated: 1766436796