private void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Player")) { Damage(); } void Damage() { healthController.playerHealth = healthController.playerHealth - SpikeDamage; healthController.UpdateHealth(); this.gameObject.SetActive(false); } }
void Move() { healthController.playerHealth = healthController.playerHealth - bombDamage; healthController.UpdateHealth(); SoundManagerScript.PlaySound("hit"); }
void Damage() { healthController.playerHealth = healthController.playerHealth - vDamage; healthController.UpdateHealth(); this.gameObject.SetActive(false); }
public void Damage() { healthController.currentHealth = healthController.currentHealth - damage; healthController.UpdateHealth(); this.gameObject.SetActive(false); }