Exemple #1
0
 void HandleHPChange(int damage)
 {
     amscript.playCutSounds(source);//audio
     GetComponent <customCharController>().currentHealth -= damage;
     healthSlider.GetComponent <HealthScript>().AdjustSlider(damage, this.tag);
     _psystem.Play();
 }
Exemple #2
0
 public void TakeDamage(float amount)
 {
     amscript.playCutSounds(source);//audio
     health -= amount;
     if (health <= 0 && isDead != true)
     {
         Die();
         isDead = true;
         em.RegisterDeath();
     }
     _psystem.Play();
 }