private static Map<Direction,Sprite[]> splitTiles(SpriteStore st,Sprite orig){
  int twidth=NUM_ATTACK_FRAMES * TILE_SIZE;
  int theight=4 * TILE_SIZE;
  Map<Direction,Sprite[]> map=new EnumMap<Direction,Sprite[]>(Direction.class);
  int y=0;
  map.put(Direction.UP,st.getTiles(orig,0,y,NUM_ATTACK_FRAMES,twidth,theight));
  y+=theight;
  map.put(Direction.RIGHT,st.getTiles(orig,0,y,NUM_ATTACK_FRAMES,twidth,theight));
  y+=theight;
  map.put(Direction.DOWN,st.getTiles(orig,0,y,NUM_ATTACK_FRAMES,twidth,theight));
  y+=theight;
  map.put(Direction.LEFT,st.getTiles(orig,0,y,NUM_ATTACK_FRAMES,twidth,theight));
  return map;
}

private static Map < Direction , Sprite [ ] > splitTiles ( SpriteStore st , Sprite orig ) { int twidth = NUM_ATTACK_FRAMES * TILE_SIZE ; int theight = 4 * TILE_SIZE ; Map < Direction , Sprite [ ] > map = new EnumMap < Direction , Sprite [ ] > ( Direction . class ) ; int y = 0 ; map . put ( Direction . UP , st . getTiles ( orig , 0 , y , NUM_ATTACK_FRAMES , twidth , theight ) ) ; y += theight ; map . put ( Direction . RIGHT , st . getTiles ( orig , 0 , y , NUM_ATTACK_FRAMES , twidth , theight ) ) ; y += theight ; map . put ( Direction . DOWN , st . getTiles ( orig , 0 , y , NUM_ATTACK_FRAMES , twidth , theight ) ) ; y += theight ; map . put ( Direction . LEFT , st . getTiles ( orig , 0 , y , NUM_ATTACK_FRAMES , twidth , theight ) ) ; return map ; }
split a sprite to a set of attack images .
