Ejemplo n.º 1
0
 private void BombSpawnerCheck()
 {
     if (matchHandler.currentMatches.Count == 4 || matchHandler.currentMatches.Count == 7)
     {
         matchHandler.CheckBombs();
     }
     if (matchHandler.currentMatches.Count == 5 || matchHandler.currentMatches.Count == 8)
     {
         if (ColumnOrRow() && selectedGem != null && selectedGem.isMatched)
         {
             if (!selectedGem.isColorBomb)
             {
                 selectedGem.isMatched = false;
                 selectedGem.ColorBombSpawner();
             }
             else
             {
                 if (selectedGem.sideGem != null)
                 {
                     GemManager _otherGem = selectedGem.sideGem.GetComponent <GemManager>();
                     if (_otherGem.isMatched && !_otherGem.isColorBomb)
                     {
                         _otherGem.isMatched = false;
                         _otherGem.ColorBombSpawner();
                     }
                 }
             }
         }
     }
 }