Платформер враги, инфраструктура, герой

This commit is contained in:
ThomasCharester committed 2026-03-09 16:28:40 +03:00
1 parent 28125eb382
commit 93819c1dd3
61 files changed
+1463 -423

No files matched your search

@@ -18,7 +18,7 @@ using Reflex.Core;
using Reflex.Injectors;
using Unity.Cinemachine;
using UnityEngine.SceneManagement;
// Ивенты создания панелей сломаны TODO
namespace Code.Infrastructure.App.States
{
[State(typeof(AppStates), typeof(AppStateMachineContext))]
@@ -27,7 +27,6 @@ namespace Code.Infrastructure.App.States
IOnGameplaySceneLoadedHandler,
IRaceGameHandle,
IRacerFactoryInitializedHandle,
IUIPanelLoaded,
ICinematicMachineHandle
{
public GameplayState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
@@ -52,11 +51,11 @@ namespace Code.Infrastructure.App.States
// CinemachineCamera
_gameplayLoading = new Loading(7, GameplayLoadingCompleted);
Context.UIService.TryLoadPanel(UIPanelType.PlayerScoreCounter);
Context.UIService.TryLoadPanel(UIPanelType.WinScreen);
Context.UIService.TryLoadPanel(UIPanelType.PlayerScores);
Context.UIService.TryLoadCreatePanel(UIPanelType.PlayerScoreCounter);
Context.UIService.TryLoadCreatePanel(UIPanelType.WinScreen);
Context.UIService.TryLoadCreatePanel(UIPanelType.PlayerScores);
Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
Context.InputService.EnableMap(ActionMappings.Gameplay);
Context.InputService.EnableMap(ActionMappings.Race);
Context.CameraFactory.LoadCinemachineCamera(CameraMode.ThirdPerson).Forget();
}
@@ -85,7 +84,7 @@ namespace Code.Infrastructure.App.States
Context.UIService.TryRemovePanel(UIPanelType.WinScreen);
Context.UIService.TryRemovePanel(UIPanelType.PlayerScores);
Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.ThirdPerson);
Context.InputService.DisableMap(ActionMappings.Gameplay);
Context.InputService.DisableMap(ActionMappings.Race);
_raceGame = null;
@@ -120,7 +119,7 @@ namespace Code.Infrastructure.App.States
public void RaceGameEnded(RaceScores scores)
{
var winScreen = (WinScreen)Context.UIService.TryGetPanel(UIPanelType.WinScreen);
var winScreen = (WinScreen)Context.UIService.TryGetSinglePanel(UIPanelType.WinScreen);
var id = 0;
var cachedScores = scores.GetScores();
@@ -133,7 +132,7 @@ namespace Code.Infrastructure.App.States
var winText = $@"{id} МЕСТО\n";
winScreen.SetText(winText);
var getPanel = Context.UIService.TryGetPanel(UIPanelType.PlayerScores);
var getPanel = Context.UIService.TryGetSinglePanel(UIPanelType.PlayerScores);
((PlayerScores)getPanel)
.SetText(UNTILTHEYFIXCONTAINERS.Resolve<PlayerPrefsRacePoopshitter>().GetRaces());
Context.UIService.ClosePanel(UIPanelType.PlayerScoreCounter);
@@ -176,5 +175,14 @@ namespace Code.Infrastructure.App.States
}
public void CinemachineLoaded(CinemachineCamera cinemachineCamera) => _gameplayLoading.DoProgress();
public void UISinglePanelLoaded(UIPanelType uiPanelType)
{
}
public void UISinglePanelRemoved(UIPanelType uiPanelType)
{
throw new System.NotImplementedException();
}
}
}