Example #1
0
        public override void DealtDamage(EntityLiving dealtBy)
        {
            if (!isHit)
            {
                takeDamage(dealtBy);

                healthRatio = ((float)health / (float)maxHealth);
                healthBarWidth = (int)((healthRatio) * 32);
            }
        }
Example #2
0
 public override void DealDamage(EntityLiving dealTo)
 {
     dealTo.DealtDamage(this);
 }
Example #3
0
 public override void DealtDamage(EntityLiving dealtBy)
 {
     if (!isHit)
     {
         takeDamage(dealtBy);
         guiHUD.UpdateHealthBar();
     }
 }
Example #4
0
 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();
 }
Example #5
0
 public abstract void DealtDamage(EntityLiving dealtBy);
Example #6
0
        //public Entity prevHit;

        public abstract void DealDamage(EntityLiving dealTo);
Example #7
0
 public override void DealDamage(EntityLiving dealTo)
 {
     dealTo.DealtDamage(this);
 }