Exemplo n.º 1
0
  @Override
  public void draw(Graphics g) {
    super.draw(g);
    AffineTransform at = new AffineTransform();

    at.setTransform(scaler.getScale(), 0, 0, scaler.getScale(), 0, 0);
    anim.setAffineTransform(at);
    anim.draw(g);
  }
Exemplo n.º 2
0
  @Override
  public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Pixel[][] pixels = game.getDisplay();
    for (Pixel[] row : pixels) {
      for (Pixel pixel : row) {
        game.getPixelType(pixel.id).draw(pixel, game, g);
      }
    }
    List<Animation> animations = game.getAnimations();

    for (Animation a : animations) {
      a.draw(g);
    }
    frames++;
  }