Platformer example started
This commit is contained in:
1 parent
efcfaae647
commit
9f026b76d6
325 files changed
+23540
-270
No files matched your search
@@ -9,6 +9,7 @@ using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using Reflex.Injectors;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
@@ -26,7 +27,8 @@ namespace Code.Infrastructure.App
|
||||
IVolumeLoaded,
|
||||
IAudioSourcePoolInitializedHandle,
|
||||
IAudioConfigsLoadedHandle,
|
||||
ICinematicMachineHandle
|
||||
ICinematicMachineHandle,
|
||||
ILayerMasksInitializedHandle
|
||||
{
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
@@ -64,7 +66,6 @@ namespace Code.Infrastructure.App
|
||||
Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(AudioService), new[] { typeof(IAudioService) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
|
||||
}
|
||||
|
||||
private void InitLoadings()
|
||||
@@ -79,8 +80,9 @@ namespace Code.Infrastructure.App
|
||||
// Audio Factory
|
||||
// Audio Pool
|
||||
// Cinemachine Camera
|
||||
_initialLoading = new Loading(10, () => EssentialLoadEnded(_thatRightContainer));
|
||||
|
||||
// Layer masks
|
||||
_initialLoading = new Loading(11, () => EssentialLoadEnded(_thatRightContainer));
|
||||
|
||||
_ui2CamLoading = new Loading(2,
|
||||
() =>
|
||||
{
|
||||
@@ -99,7 +101,9 @@ namespace Code.Infrastructure.App
|
||||
_thatRightContainer = container;
|
||||
|
||||
container.Resolve<EventBus.EventBus>().Subscribe(this);
|
||||
|
||||
|
||||
ConstructorInjector.Construct(typeof(LayerMasks), container);
|
||||
|
||||
var cameraFactory = container.Resolve<CameraFactory>();
|
||||
cameraFactory.CreateCameraStateMachine(container.Resolve<CameraStateMachine>())
|
||||
.Forget();
|
||||
@@ -109,7 +113,8 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
container.Resolve<EventBus.EventBus>().Unsubscribe(this);
|
||||
container.Resolve<AppStateMachine>().SwitchState(AppStates.Bootstrap)
|
||||
.AllowStateTransition(AppStates.Gameplay);
|
||||
.AllowStateTransition(AppStates.Gameplay)
|
||||
.AllowStateTransition(AppStates.Platformer);
|
||||
container.Resolve<AppStateMachineContext>().StateMachine = container.Resolve<AppStateMachine>();
|
||||
}
|
||||
|
||||
@@ -127,7 +132,8 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
_thatRightContainer.Resolve<CameraStateMachineContext>().cameraLoadedData = data;
|
||||
_thatRightContainer.Resolve<CameraStateMachine>().SwitchState(CameraMode.None)
|
||||
.AllowStateTransition(CameraMode.ThirdPerson);
|
||||
.AllowStateTransition(CameraMode.ThirdPerson)
|
||||
.AllowStateTransition(CameraMode.Platformer);
|
||||
|
||||
data.Camera.GetUniversalAdditionalCameraData().renderPostProcessing = true;
|
||||
|
||||
@@ -198,5 +204,10 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
|
||||
public void LayerMasksInitialized()
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user