Example #1
0
 private void CheckMakeBombs()
 {
     if (findMatches.currentMatches.Count >= 4 || findMatches.currentMatches.Count <= 8)
     {
         // make a type bomb
         if (currentTile != null)
         {
             if (currentTile.isMatch)
             {
                 if (!currentTile.isTypeBomb)
                 {
                     currentTile.isMatch = false;
                     currentTile.MakeTypeBomb();
                     if (soundManager != null)
                     {
                         soundManager.Bark();
                     }
                 }
             }
             else
             {
                 if (currentTile.otherTile != null)
                 {
                     Tile other = currentTile.otherTile.GetComponent <Tile>();
                     if (other.isMatch)
                     {
                         if (!other.isTypeBomb)
                         {
                             other.isMatch = false;
                             other.MakeTypeBomb();
                         }
                     }
                 }
             }
         }
     }
 }