Commit b8c6c557 authored by Theodore Lopez's avatar Theodore Lopez

simplification for gold picture

parent 4a2fd459
...@@ -331,22 +331,16 @@ public class EntityDisplayerProvider { ...@@ -331,22 +331,16 @@ public class EntityDisplayerProvider {
for (Action action : Action.values()) { for (Action action : Action.values()) {
Sprite persoR = new Sprite (gold.getSpriteImage(), 0, 0, 64, 32); Sprite persoR = new Sprite (gold.getSpriteImage());
Animation persoAnimationRIGHT = new Animation(persoR, 2, frameDelay); Animation persoAnimation = new Animation(persoR, 2, frameDelay);
animationMapTab[Direction.RIGHT.ordinal()].put(action, persoAnimationRIGHT); animationMapTab[Direction.RIGHT.ordinal()].put(action, persoAnimation);
animationMapTab[Direction.RIGHTUP.ordinal()].put(action, persoAnimationRIGHT); animationMapTab[Direction.RIGHTUP.ordinal()].put(action, persoAnimation);
Sprite persoU = new Sprite (gold.getSpriteImage(), 0, 32, 64, 32); animationMapTab[Direction.UP.ordinal()].put(action, persoAnimation);
Animation persoAnimationUP = new Animation(persoU, 2, frameDelay); animationMapTab[Direction.LEFTUP.ordinal()].put(action, persoAnimation);
animationMapTab[Direction.UP.ordinal()].put(action, persoAnimationUP); animationMapTab[Direction.LEFT.ordinal()].put(action, persoAnimation);
animationMapTab[Direction.LEFTUP.ordinal()].put(action, persoAnimationUP); animationMapTab[Direction.LEFTDOWN.ordinal()].put(action, persoAnimation);
Sprite persoL = new Sprite (gold.getSpriteImage(), 0, 64, 64, 32); animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimation);
Animation persoAnimationLEFT = new Animation(persoL, 2, frameDelay); animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimation);
animationMapTab[Direction.LEFT.ordinal()].put(action, persoAnimationLEFT);
animationMapTab[Direction.LEFTDOWN.ordinal()].put(action, persoAnimationLEFT);
Sprite persoroseD = new Sprite (gold.getSpriteImage(), 0, 96, 64, 32);
Animation persoAnimationDOWN = new Animation(persoroseD, 2, frameDelay);
animationMapTab[Direction.DOWN.ordinal()].put(action, persoAnimationDOWN);
animationMapTab[Direction.RIGHTDOWN.ordinal()].put(action, persoAnimationDOWN);
} }
return new EntityDisplayer(associatedEntity, animationMapTab, 'C'); return new EntityDisplayer(associatedEntity, animationMapTab, 'C');
} }
......
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