Move Bomb Responsibilities to BombService
This commit is contained in:
@@ -2,19 +2,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Models.Interfaces;
|
||||
using Structs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Services.Interfaces
|
||||
{
|
||||
public interface IBombService
|
||||
{
|
||||
IReadOnlyList<Vector2Int> CollectTriggeredBombs(IReadOnlyList<Vector2Int> matchPositions);
|
||||
public interface IBombService {
|
||||
public BombSpawnRequest? PendingBombSpawn { get; }
|
||||
|
||||
void SetLastSwap(Vector2Int from, Vector2Int to);
|
||||
void ClearPendingBombs();
|
||||
|
||||
void DetectBombSpawnFromLastSwap(List<Gem> currentMatches);
|
||||
|
||||
UniTask DetonateChainAsync(
|
||||
IReadOnlyList<Vector2Int> initialBombs,
|
||||
Func<Vector2Int, bool> inBounds,
|
||||
Func<Vector2Int, Gem> getGemAt,
|
||||
Func<Vector2Int, UniTask> destroyAtAsync,
|
||||
int radius,
|
||||
float bombDelaySeconds);
|
||||
IGameBoard gameBoard);
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,7 @@ using Structs;
|
||||
namespace Services.Interfaces {
|
||||
public interface IMatchService {
|
||||
List<Gem> CurrentMatches { get; }
|
||||
IReadOnlyList<BombSpawnRequest> PendingBombSpawns { get; }
|
||||
bool MatchesAt(Vector2Int positionToCheck, GemType gemTypeToCheck);
|
||||
void FindAllMatches();
|
||||
void SetLastSwap(Vector2Int from, Vector2Int to);
|
||||
void ClearPendingBombs();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user