Commit fd2a804b authored by Gwendoline's avatar Gwendoline
Browse files

Entities animation now stop moving when entity are doing nothing

parent 1ed35ba3
......@@ -67,6 +67,25 @@ public class EntityDisplayerProvider {
animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimationDOWN);
}
Sprite persoR = new Sprite (SpriteStorage.getInstance().getChatRose().getSpriteImage(), 0, 0, 32, 32);
Animation persoAnimationRIGHT = new Animation(persoR, 1, frameDelay);
animationMapTab[Direction.RIGHT.ordinal()].put(Action.NONE, persoAnimationRIGHT);
animationMapTab[Direction.RIGHTUP.ordinal()].put(Action.NONE, persoAnimationRIGHT);
Sprite persoU = new Sprite (SpriteStorage.getInstance().getChatRose().getSpriteImage(), 0, 32, 32, 32);
Animation persoAnimationUP = new Animation(persoU, 1, frameDelay);
animationMapTab[Direction.UP.ordinal()].put(Action.NONE, persoAnimationUP);
animationMapTab[Direction.LEFTUP.ordinal()].put(Action.NONE, persoAnimationUP);
Sprite persoL = new Sprite (SpriteStorage.getInstance().getChatRose().getSpriteImage(), 0, 64, 32, 32);
Animation persoAnimationLEFT = new Animation(persoL, 1, frameDelay);
animationMapTab[Direction.LEFT.ordinal()].put(Action.NONE, persoAnimationLEFT);
animationMapTab[Direction.LEFTDOWN.ordinal()].put(Action.NONE, persoAnimationLEFT);
Sprite persoroseD = new Sprite (SpriteStorage.getInstance().getChatRose().getSpriteImage(), 0, 96, 32, 32);
Animation persoAnimationDOWN = new Animation(persoroseD, 1, frameDelay);
animationMapTab[Direction.DOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
return new EntityDisplayer(associatedEntity, animationMapTab, 'C');
}
case RONFLEX: {
......@@ -98,6 +117,23 @@ public class EntityDisplayerProvider {
animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimationDOWN);
}
Sprite persoR = new Sprite (SpriteStorage.getInstance().getRonflex().getSpriteImage(), 0, 0, 32, 32);
Animation persoAnimationRIGHT = new Animation(persoR, 1, frameDelay);
animationMapTab[Direction.RIGHT.ordinal()].put(Action.NONE, persoAnimationRIGHT);
animationMapTab[Direction.RIGHTUP.ordinal()].put(Action.NONE, persoAnimationRIGHT);
Sprite persoU = new Sprite (SpriteStorage.getInstance().getRonflex().getSpriteImage(), 0, 32, 32, 32);
Animation persoAnimationUP = new Animation(persoU, 1, frameDelay);
animationMapTab[Direction.UP.ordinal()].put(Action.NONE, persoAnimationUP);
animationMapTab[Direction.LEFTUP.ordinal()].put(Action.NONE, persoAnimationUP);
Sprite persoL = new Sprite (SpriteStorage.getInstance().getRonflex().getSpriteImage(), 0, 64, 32, 32);
Animation persoAnimationLEFT = new Animation(persoL, 1, frameDelay);
animationMapTab[Direction.LEFT.ordinal()].put(Action.NONE, persoAnimationLEFT);
animationMapTab[Direction.LEFTDOWN.ordinal()].put(Action.NONE, persoAnimationLEFT);
Sprite persoroseD = new Sprite (SpriteStorage.getInstance().getRonflex().getSpriteImage(), 0, 96, 32, 32);
Animation persoAnimationDOWN = new Animation(persoroseD, 1, frameDelay);
animationMapTab[Direction.DOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
return new EntityDisplayer(associatedEntity, animationMapTab, 'C');
}
case PONYTA: {
......@@ -129,6 +165,23 @@ public class EntityDisplayerProvider {
animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimationDOWN);
}
Sprite persoR = new Sprite (SpriteStorage.getInstance().getPonyta().getSpriteImage(), 0, 0, 32, 32);
Animation persoAnimationRIGHT = new Animation(persoR, 1, frameDelay);
animationMapTab[Direction.RIGHT.ordinal()].put(Action.NONE, persoAnimationRIGHT);
animationMapTab[Direction.RIGHTUP.ordinal()].put(Action.NONE, persoAnimationRIGHT);
Sprite persoU = new Sprite (SpriteStorage.getInstance().getPonyta().getSpriteImage(), 0, 32, 32, 32);
Animation persoAnimationUP = new Animation(persoU, 1, frameDelay);
animationMapTab[Direction.UP.ordinal()].put(Action.NONE, persoAnimationUP);
animationMapTab[Direction.LEFTUP.ordinal()].put(Action.NONE, persoAnimationUP);
Sprite persoL = new Sprite (SpriteStorage.getInstance().getPonyta().getSpriteImage(), 0, 64, 32, 32);
Animation persoAnimationLEFT = new Animation(persoL, 1, frameDelay);
animationMapTab[Direction.LEFT.ordinal()].put(Action.NONE, persoAnimationLEFT);
animationMapTab[Direction.LEFTDOWN.ordinal()].put(Action.NONE, persoAnimationLEFT);
Sprite persoroseD = new Sprite (SpriteStorage.getInstance().getPonyta().getSpriteImage(), 0, 96, 32, 32);
Animation persoAnimationDOWN = new Animation(persoroseD, 1, frameDelay);
animationMapTab[Direction.DOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
return new EntityDisplayer(associatedEntity, animationMapTab, 'C');
}
case DIAGLA: {
......@@ -160,6 +213,23 @@ public class EntityDisplayerProvider {
animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimationDOWN);
}
Sprite persoR = new Sprite (SpriteStorage.getInstance().getDiagla().getSpriteImage(), 0, 0, 64, 64);
Animation persoAnimationRIGHT = new Animation(persoR, 1, frameDelay);
animationMapTab[Direction.RIGHT.ordinal()].put(Action.NONE, persoAnimationRIGHT);
animationMapTab[Direction.RIGHTUP.ordinal()].put(Action.NONE, persoAnimationRIGHT);
Sprite persoU = new Sprite (SpriteStorage.getInstance().getDiagla().getSpriteImage(), 0, 64, 64, 64);
Animation persoAnimationUP = new Animation(persoU, 1, frameDelay);
animationMapTab[Direction.UP.ordinal()].put(Action.NONE, persoAnimationUP);
animationMapTab[Direction.LEFTUP.ordinal()].put(Action.NONE, persoAnimationUP);
Sprite persoL = new Sprite (SpriteStorage.getInstance().getDiagla().getSpriteImage(), 0, 128, 64, 64);
Animation persoAnimationLEFT = new Animation(persoL, 1, frameDelay);
animationMapTab[Direction.LEFT.ordinal()].put(Action.NONE, persoAnimationLEFT);
animationMapTab[Direction.LEFTDOWN.ordinal()].put(Action.NONE, persoAnimationLEFT);
Sprite persoroseD = new Sprite (SpriteStorage.getInstance().getDiagla().getSpriteImage(), 0, 192, 64, 64);
Animation persoAnimationDOWN = new Animation(persoroseD, 1, frameDelay);
animationMapTab[Direction.DOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(Action.NONE, persoAnimationDOWN);
return new EntityDisplayer(associatedEntity, animationMapTab, 'C');
}
case FIREBOLT: {
......@@ -191,6 +261,7 @@ public class EntityDisplayerProvider {
animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimationDOWN);
}
return new EntityDisplayer(associatedEntity, animationMapTab, 'C');
}
case FROSTBOLT: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment