Implement Bombs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user