Example #1
0
 public void paintComponent(Graphics g) {
   super.paintComponent(g);
   map.drawMap(g);
   gs.imitate(shapes.get(0), map);
   gs.draw(g);
   if (shapes.size() > 0) shapes.get(0).draw(g);
   character.putCharacter(g); // draws the character
   for (int i = 0; i < weaponList.size(); i++) {
     weaponList.get(i).draw(g); // draws each weapon object
   }
   water.draw(g); // draws the water image
   g.setColor(Color.black);
   g.drawString("score: ", 300, 350);
 }