Skip to content
Snippets Groups Projects
Commit f6617e65 authored by bruno's avatar bruno
Browse files

bug monster

parent ecc5e115
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,7 @@ public class Monster extends Entity{
public void attaque(){//isAttacking > 0 pour dire que si il est entrain d'attaquer, il finit son attaque
if ((Math.abs(this.coord.getX()-getGameCharacter().coord.getX()) <= 2+entityWIDTH/2+getGameCharacter().entityWIDTH/2 && Math.abs(this.coord.getZ()-getGameCharacter().coord.getZ()) <= entityHEIGHT && characInFrontOf()) || isAttacking > 0){ //n'attaque que si perso pas invincible
//si il n'est pas immobile il s'arrete
if (isAttacking >= 50){
if (isAttacking <= 50){
isAttacking++;
}
//sinon on cree l'attaque
......@@ -144,8 +144,7 @@ public class Monster extends Entity{
}
private void updateNbFrameInvincible(){
nbFramesInvincible = Math.max(0, nbFramesInvincible-1);
private void updateNbFrameInvincible(){nbFramesInvincible = Math.max(0, nbFramesInvincible-1);
}
private Boolean characInFrontOf(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment