Fixed Object Pooling and cascading

This commit is contained in:
2025-12-14 19:19:40 +08:00
parent 68046b8960
commit 95b43ed772
13 changed files with 154 additions and 40 deletions

View File

@@ -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>();
}