added gameplay lifetimescope
This commit is contained in:
@@ -3,16 +3,19 @@ using UnityEngine;
|
||||
using VContainer;
|
||||
using VContainer.Unity;
|
||||
|
||||
public abstract class BaseLifetimeScope : LifetimeScope
|
||||
namespace Darkmatter.App.LifetimeScopes
|
||||
{
|
||||
[SerializeField] private MonoBehaviour[] serviceModules;
|
||||
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
public abstract class BaseLifetimeScope : LifetimeScope
|
||||
{
|
||||
foreach (var module in serviceModules)
|
||||
[SerializeField] private MonoBehaviour[] serviceModules;
|
||||
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
{
|
||||
if (module is IServiceModule serviceModule)
|
||||
serviceModule.Register(builder);
|
||||
foreach (var module in serviceModules)
|
||||
{
|
||||
if (module is IServiceModule serviceModule)
|
||||
serviceModule.Register(builder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
using VContainer;
|
||||
|
||||
public class GameLifetimeScope : BaseLifetimeScope
|
||||
namespace Darkmatter.App.LifetimeScopes
|
||||
{
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
public class GameLifetimeScope : BaseLifetimeScope
|
||||
{
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Darkmatter.App.LifetimeScopes
|
||||
{
|
||||
public class GameplayLifetimescope : BaseLifetimeScope
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b08651ebc7d8347b4957067e8be677bc
|
||||
@@ -1,9 +1,11 @@
|
||||
using VContainer;
|
||||
using VContainer.Unity;
|
||||
|
||||
public class RootLifetimeScope : BaseLifetimeScope
|
||||
namespace Darkmatter.App.LifetimeScopes
|
||||
{
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
public class RootLifetimeScope : BaseLifetimeScope
|
||||
{
|
||||
protected override void Configure(IContainerBuilder builder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user