Skip to content
Snippets Groups Projects
Commit 6c15f5c4 authored by BRUGNEAUX Louis's avatar BRUGNEAUX Louis
Browse files

Déplacements du boss changés

parent 8e1c4554
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,8 @@ public class Boss extends Monster{
oldCoord = coord;
//pour faire un deplacement cyclique
if ((coordInit.getX()-coord.getX() >= 500 && direction == -1) || coord.getX() <= obstacleBeneath.getHitbox().getExtremites().get("HautGauche").getX())direction = 1;
else if ((coordInit.getX()-coord.getX() <= -500 && direction == 1) || coord.getX() >= obstacleBeneath.getHitbox().getExtremites().get("HautDroite").getX())direction = -1;
if ((coordInit.getX()-coord.getX() >= 130 && direction == -1) || coord.getX() <= obstacleBeneath.getHitbox().getExtremites().get("HautGauche").getX())direction = 1;
else if ((coordInit.getX()-coord.getX() <= -130 && direction == 1) || coord.getX() >= obstacleBeneath.getHitbox().getExtremites().get("HautDroite").getX())direction = -1;
//******************
double newX = coord.getX() + (1-Math.min(isAttacking,1))*direction*vitesseMax*delta;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment