Exemple #1
0
 public void draw(final Graphics g, final int x, final int y, final int w, final int h) {
   final ImagesLoader imsLd = ImagesLoader.getInstance();
   final BufferedImage im = imsLd.getImage(MapManager.returnImage(type));
   if (im != null) {
     g.drawImage(im, x, y, w, h, null);
   }
 }
 public SpriteEwin(
     final Game g,
     final Hero hero,
     final int x,
     final int y,
     final int w,
     final int h,
     final String name,
     final String image) {
   super(
       x,
       y,
       g.getPanel().getWidth(),
       g.getPanel().getHeight(),
       ImagesLoader.getInstance(),
       name,
       image);
   width = w;
   height = h;
   game = g;
   ewin = hero;
   // try {
   // player = new ImagesPlayer("run", g.getProgramPeriod(),
   // g.getPeriodBetween2Images(), true,
   // ImagesLoader.getInstance());
   // } catch (final TooShortImagePeriodException e) {
   // // TODO Auto-generated catch block
   // e.printStackTrace();
   // }
 }