Example #1
0
 public void Damage(float damage)
 {
     remainHealth -= damage;
     if (remainHealth <= 0.0f)
     {
         Destroy(gameObject);
         player.AddScore(destroyScore);
         player.AddPoint(destroyScore);
         globalControl.addBreakTargetCount();
         soundCrush.PlayOneShot(soundCrush.clip);
     }
 }