Машина, камера, мотор
This commit is contained in:
1 parent
b54083521f
commit
a45223d0e7
48 files changed
+5507
-3735
No files matched your search
@@ -9,6 +9,7 @@ using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using Resolution = Reflex.Enums.Resolution;
|
||||
@@ -24,10 +25,13 @@ namespace Code.Infrastructure.App
|
||||
IVolumesInitializedHandle,
|
||||
IVolumeLoaded,
|
||||
IAudioSourcePoolInitializedHandle,
|
||||
IAudioConfigsLoadedHandle
|
||||
IAudioConfigsLoadedHandle,
|
||||
ICinematicMachineHandle
|
||||
{
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
InitLoadings();
|
||||
|
||||
containerBuilder.RegisterType(typeof(EventBus.EventBus), Lifetime.Singleton, Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(ConfigLocator), new[] { typeof(IConfigLocator) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
@@ -61,6 +65,10 @@ namespace Code.Infrastructure.App
|
||||
containerBuilder.RegisterType(typeof(AudioService), new[] { typeof(IAudioService) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
|
||||
}
|
||||
|
||||
private void InitLoadings()
|
||||
{
|
||||
// UIFactory
|
||||
// Logo
|
||||
// Scene configs
|
||||
@@ -70,7 +78,9 @@ namespace Code.Infrastructure.App
|
||||
// Loading volume
|
||||
// Audio Factory
|
||||
// Audio Pool
|
||||
_initialLoading = new Loading(9, () => EssentialLoadEnded(_thatRightContainer));
|
||||
// Cinemachine Camera
|
||||
_initialLoading = new Loading(10, () => EssentialLoadEnded(_thatRightContainer));
|
||||
|
||||
_ui2CamLoading = new Loading(2,
|
||||
() =>
|
||||
{
|
||||
@@ -90,7 +100,8 @@ namespace Code.Infrastructure.App
|
||||
|
||||
container.Resolve<EventBus.EventBus>().Subscribe(this);
|
||||
|
||||
container.Resolve<CameraFactory>().CreateCameraStateMachine(container.Resolve<CameraStateMachine>())
|
||||
var cameraFactory = container.Resolve<CameraFactory>();
|
||||
cameraFactory.CreateCameraStateMachine(container.Resolve<CameraStateMachine>())
|
||||
.Forget();
|
||||
}
|
||||
|
||||
@@ -121,6 +132,8 @@ namespace Code.Infrastructure.App
|
||||
|
||||
_ui2CamLoading.DoProgress();
|
||||
_initialLoading.DoProgress();
|
||||
|
||||
_thatRightContainer.Resolve<CameraFactory>().LoadCinemachineCamera(CameraMode.None).Forget();
|
||||
}
|
||||
|
||||
public void UIInitialized()
|
||||
@@ -179,5 +192,10 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
|
||||
public void CinemachineLoaded(CinemachineCamera cinemachineCamera)
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user