private void checkIfDead() { if (PlayerHealthPoints <= 0) { deathHandler.HandleDeath(); } }
// Update is called once per frame void FixedUpdate() { if (transform.position.y < deathHeight) { DeathHandler.HandleDeath(gameObject); } }
void IfDeadKillPlayer() { if (hitPoints <= 0) { deathHandler.HandleDeath(); } }
private void BeginTimer() { countdownTimerInSeconds -= Time.deltaTime; if (countdownTimerInSeconds <= 0) { deathHandler.HandleDeath(); } }
public void TakeDamage(float damage) { health -= damage; if (health <= Mathf.Epsilon) { deathHandler.HandleDeath(); } }
public void PlayerTakeDamage(int damageIn) { playerDamage -= damageIn; healthText.text = playerDamage.ToString() + maxHP; if (playerDamage <= 0) { DeathHandler deathHandler = GetComponent <DeathHandler>(); deathHandler.HandleDeath(); } }
public void TakeDamage(float damage) { playerHealth -= damage; myDamageDisplay.ShowDamageImpact(); if (playerHealth <= 0) { print("Player has died"); myDeathHandler.HandleDeath(); } }
public void HandleDamage(float damage) { if (isDead) { return; } curHP -= damage; if (curHP <= 0) { isDead = true; deathHandler.HandleDeath(); return; } //Hit Reaction Effect hitReactionObject.StartHitReaction(); }