Пример гоночки

This commit is contained in:
ThomasCharester committed 2026-01-28 16:30:32 +03:00
1 parent 0f46c63b5d
commit 1f8e14d078
77 files changed
+10246 -90

No files matched your search

@@ -1,4 +1,3 @@
using System;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Camera;
using Code.Infrastructure.Configs;
@@ -8,7 +8,7 @@ namespace Code.Infrastructure.App.States
{
[State(typeof(AppStates),typeof(AppStateMachineContext))]
[StateRaisingEvent]
public partial class BootstrapState : IOnGameplaySceneLoadedHandler, IUIPanelLoaded, IReadyToPlayHandle
public partial class BootstrapState : IUIPanelLoaded, IReadyToPlayHandle
{
private EventBus.EventBus _eventBus;
public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
@@ -21,9 +21,10 @@ namespace Code.Infrastructure.App.States
{
_eventBus.Subscribe(this);
Context.UIService.TryRemovePanel(UIPanelType.Logo);
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
// Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
}
protected override void OnExitState()
@@ -33,11 +34,6 @@ namespace Code.Infrastructure.App.States
_eventBus.Unsubscribe(this);
}
public void OnGameplaySceneLoaded()
{
}
public void UILoaded(UIPanelType uiPanelType)
{
if (uiPanelType != UIPanelType.DebugSceneChooser) return;
@@ -47,7 +43,7 @@ namespace Code.Infrastructure.App.States
public void OnReadyToPlay(AudioNames groupName)
{
// Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0,new CancellationTokenSource());
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0,new CancellationTokenSource());
}
}
}