Ejemplo n.º 1
0
 private float TargetBodyY(Entity target, Entity entity, CLNS.AttackBox attack)
 {
     float y1 = entity.GetPosY();
     return (y1) - (attack.GetRect().Height / 1.5f) + (attack.GetOffset().Y);
 }
Ejemplo n.º 2
0
        private float TargetBodyX(Entity target, Entity entity, CLNS.AttackBox attack)
        {
            float x1 = (target.GetPosX() + (target.GetWidth() / 4));

            if (entity.GetPosX() >= target.GetPosX() + (target.GetWidth() / 4))
            {
                x1 = (target.GetPosX() + (target.GetWidth() / 4));
            }
            else if (entity.GetPosX() <= target.GetPosX() + (target.GetWidth() / 4))
            {
                x1 = (target.GetPosX() - (target.GetWidth() / 4));
            }

            return x1 + (attack.GetOffset().X / 2);
        }