//Function to check if the entity is dead private void CheckIsDead() { //if currentHealth is equal to or less than 0 if (currentHealth <= 0) { //Set isDead to true isDead = true; eEntityState = EntityState.EEntityState.DEAD; Dead(); } }
public void SetUpHealthStats() { //Setting inital values for the private variables bleedInterval = 1.0f; bleedStartTime = 0.5f; isDead = false; eEntityState = EntityState.EEntityState.ALIVE; //Setting the currentHealth to the Health of the entity currentHealth = Health; }