public override void DealtDamage(EntityLiving dealtBy) { if (!isHit) { takeDamage(dealtBy); healthRatio = ((float)health / (float)maxHealth); healthBarWidth = (int)((healthRatio) * 32); } }
public override void DealDamage(EntityLiving dealTo) { dealTo.DealtDamage(this); }
public override void DealtDamage(EntityLiving dealtBy) { if (!isHit) { takeDamage(dealtBy); guiHUD.UpdateHealthBar(); } }
public void takeDamage(EntityLiving dealtBy, Element damageType = Element.PHYSICAL) { if (health - calculateDefenseDamage(dealtBy.damage, damageType) <= 0) { health = 0; dying = true; } else { health -= calculateDefenseDamage(dealtBy.damage, damageType); } SetHit(); }
public abstract void DealtDamage(EntityLiving dealtBy);
//public Entity prevHit; public abstract void DealDamage(EntityLiving dealTo);