-
Louis MALTERRE authoredLouis MALTERRE authored
Attack.java 425 B
package entity;
import environnement.Coordonnees;
import environnement.HitBox;
public class Attack {
int damage;
Coordonnees coordCentre;
HitBox hitBox;
public Attack(int dmg,Coordonnees c,HitBox hb){
damage = dmg;
coordCentre = c;
hitBox = hb;
}
public void dealDamage(Entity entity){
entity.setNbLifePoints(Math.max(entity.getNbLifePoints()-damage, 0));
}
}