Развитие гоночек

This commit is contained in:
ThomasCharester committed 2026-02-06 10:30:50 +03:00
1 parent ec60c47652
commit b54083521f
532 files changed
+16091 -28231

No files matched your search

+12 -1
View File
@@ -1,3 +1,4 @@
using Code.Infrastructure.App;
using Code.Infrastructure.SceneLoader;
using Reflex.Attributes;
using UnityEngine;
@@ -8,10 +9,20 @@ namespace Code.Debug
public class SceneChooser : MonoBehaviour
{
[Inject] private SceneLoader _sceneLoader;
[Inject] private AppStateMachine _stateMachine;
public void ChooseScene(int id)
{
_sceneLoader.LoadSceneAsync((SceneId)id, LoadSceneMode.Single).Forget();
}
public void ChooseState(int id)
{
_stateMachine.SwitchState((AppStates)id);
}
public void SwitchGameplay()
{
_stateMachine.SwitchState(AppStates.Gameplay).AllowStateTransition(AppStates.MainMenu);
}
}
}