Развитие гоночек
This commit is contained in:
1 parent
ec60c47652
commit
b54083521f
532 files changed
+16091
-28231
No files matched your search
@@ -1,19 +1,34 @@
|
||||
using Code.Debug;
|
||||
using Code.Example.Race;
|
||||
using Code.Example.Race.Racer;
|
||||
using Code.Example.Race.Track;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using UnityEngine;
|
||||
using Resolution = Reflex.Enums.Resolution;
|
||||
|
||||
namespace Code.Infrastructure.App.SceneInstallers
|
||||
{
|
||||
public class GameplaySceneInstaller : MonoBehaviour, IInstaller
|
||||
{
|
||||
[SerializeField] private RaceTrackData _raceTrackData;
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
|
||||
{
|
||||
containerBuilder.RegisterType(typeof(RacerFactory), new[] { typeof(IRacerFactory) }, Lifetime.Scoped,
|
||||
Resolution.Lazy);
|
||||
containerBuilder.RegisterType(typeof(RaceScores), Lifetime.Scoped,
|
||||
Resolution.Lazy);
|
||||
containerBuilder.RegisterValue(_raceTrackData);
|
||||
|
||||
containerBuilder.OnContainerBuilt += PostInstall;
|
||||
}
|
||||
|
||||
private void PostInstall(Container container)
|
||||
{
|
||||
|
||||
{
|
||||
container.Resolve<EventBus.EventBus>()
|
||||
.RaiseEvent<IOnGameplaySceneLoadedHandler>(x => x.OnGameplaySceneInitialized(container));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user