Initial commit
This commit is contained in:
21
Assets/Scripts/LifeTimeScope/GameLifetimeScope.cs
Normal file
21
Assets/Scripts/LifeTimeScope/GameLifetimeScope.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
using VContainer.Unity;
|
||||
|
||||
public class GameLifetimeScope : LifetimeScope
|
||||
{
|
||||
[SerializeField] private PlatformPool pool;
|
||||
[SerializeField] private PlatformManager manager;
|
||||
[SerializeField] private InputReaderSO inputReader;
|
||||
[SerializeField] private Player player;
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
{
|
||||
builder.RegisterComponent(pool).As<IPool>();
|
||||
builder.RegisterComponent(manager).As<IPlatformManager>();
|
||||
builder.RegisterInstance(inputReader).As<IInputReader>();
|
||||
builder.Register<ScoreService>(Lifetime.Singleton);
|
||||
builder.RegisterComponent(player);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user