private void CheckTomakeBombs() { if (findMatches.currentMatches.Count >= 5) { Debug.Log("Make a color bomb"); if (currentCandy != null) { if (currentCandy.isMatched) { if (!currentCandy.isCandyBomb) { currentCandy.isMatched = false; currentCandy.MakeCandyBomb(); } } else { if (currentCandy.otherCandy != null) { Candy otherCandy = currentCandy.otherCandy.GetComponent <Candy>(); if (otherCandy.isMatched) { if (!otherCandy.isCandyBomb) { otherCandy.isMatched = false; otherCandy.MakeCandyBomb(); } } } } } } }