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