Пример #1
0
 /// <summary>
 /// Уничтожение кристала
 /// </summary>
 public void DestroyCrystal()
 {
     if (crystal != null && crystal.type != TypeOfCrystal.starOfDeath)
     {
         if (crystal.bonus == null)
         {
             isCrystalMove = true;
             particleSystem.Play();
             destroyEffect.Activate(crystal.gameObject, true, 100);
         }
         else
         {
             if (!crystal.bonus.bounceComplite)
             {
                 if (!crystal.bonus.bounceStart)
                 {
                     crystal.bonus.Acivate();
                     cellInCombination.Clear();
                     isCrystalMove = false;
                 }
             }
             else
             {
                 isCrystalMove = true;
                 destroyEffect.Activate(crystal.gameObject, true, 100);
                 particleSystem.Play();
             }
         }
     }
     else
     {
         isCrystalMove = false;
     }
 }