Implement Bombs

This commit is contained in:
2025-12-15 02:34:59 +08:00
parent 95b43ed772
commit abff76e4ab
36 changed files with 512 additions and 753 deletions

View File

@@ -9,16 +9,23 @@ namespace Services
{
private readonly IObjectPool<GemView> gemViewPool;
private readonly IGameBoardService gameBoardService;
public LevelEntryPoint(IObjectPool<GemView> gemViewPool, IGameBoardService gameBoardService)
private readonly IInputService inputService;
public LevelEntryPoint(IObjectPool<GemView> gemViewPool, IGameBoardService gameBoardService, IInputService inputService)
{
this.gemViewPool = gemViewPool;
this.gameBoardService = gameBoardService;
this.inputService = inputService;
}
public void Start()
{
this.gameBoardService.Setup();
this.inputService.OnSwapRequested += HandleSwapRequest;
}
private void HandleSwapRequest(Vector2Int from, Vector2Int to) {
this.gameBoardService.TrySwap(from, to);
}
}
}