Fixed Object Pooling and cascading
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Models;
|
||||
using Models.Interfaces;
|
||||
using Presenter;
|
||||
using ScriptableObjects;
|
||||
using Services;
|
||||
using Services.Interfaces;
|
||||
@@ -28,10 +29,10 @@ namespace Scopes
|
||||
builder.Register<IScoreService, ScoreService>(Lifetime.Scoped);
|
||||
|
||||
builder.Register<IObjectPool<GemView>>(c =>
|
||||
new ObjectPoolService(this.gameVariables.gemsPrefabs, this.gemsHolder, this.gameVariables.width * this.gameVariables.height),
|
||||
new ObjectPoolService(this.gameVariables.gemsPrefabs, this.gemsHolder),
|
||||
Lifetime.Scoped);
|
||||
|
||||
builder.Register<IGameBoardService, GameBoardService>(Lifetime.Scoped);
|
||||
|
||||
builder.Register<IGameBoardService, GameBoardService>(Lifetime.Scoped).AsImplementedInterfaces();
|
||||
|
||||
builder.RegisterEntryPoint<LevelEntryPoint>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user