public void SetAlive() { currentHealth = maxHealth; healthState = ZombieHealthState.alive; sphereCollider.enabled = true; transform.Rotate(90f, 0f, 0f); }
public bool DealDamage(float damage) { currentHealth -= damage; if (currentHealth <= 0 && healthState == ZombieHealthState.alive) { healthState = ZombieHealthState.dead; sphereCollider.enabled = false; zombieController.StopAttack(); StartCoroutine(DeathTimer()); transform.Rotate(-90f, 0f, 0f); return(true); } else { return(false); } }