Change Bomb Implementation
- L and T shapes are no longer considered a match - Bomb explodes WITH gems - Bomb will have a small sprite of the creating gem
This commit is contained in:
@@ -306,6 +306,14 @@ namespace Services {
|
||||
Gem currentGem = this.gameBoard.GetGemAt(new Vector2Int(x,y));
|
||||
if (currentGem == null) {
|
||||
int gemToUse = RandomUtils.RandomGemTypeAsInt();
|
||||
|
||||
int iterations = 0;
|
||||
while (this.matchService.MatchesAt(new Vector2Int(x, y), (GemType)gemToUse) && iterations < 100)
|
||||
{
|
||||
gemToUse = RandomUtils.RandomGemTypeAsInt();
|
||||
iterations++;
|
||||
}
|
||||
|
||||
SpawnGem(new Vector2Int(x, y), (GemType)gemToUse);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user