protected void paintComponent(Graphics g){
		super.paintComponent(g);
		
		//System.out.println("repainted");
		Graphics2D g2 = (Graphics2D) g;
		
		//draw the player
		Player player = GUI.g.player;
		Image img = player.playerImage;
		g2.drawImage(img, player.xPosition, player.yPosition, null);
		
		//draw items
				for (int i = 0; i<items.size(); i++) {
					//img = Toolkit.getDefaultToolkit().getImage("src/images/barrel.png");
					if (items.get(i).active == false) {
						items.remove(i);
					}
					else {
						g2.drawImage(items.get(i).itemImage, items.get(i).xPosition, items.get(i).yPosition, null);
					}
				}
				for (int i = 0; i<goodItems.size(); i++) {
					//img = Toolkit.getDefaultToolkit().getImage("src/images/barrel.png");
					if (goodItems.get(i).active == false) {
						goodItems.remove(i);
					}
					else {
						g2.drawImage(goodItems.get(i).itemImage, goodItems.get(i).xPosition, goodItems.get(i).yPosition, null);
					}
				}
		
				//draw countdown after player comes back to life
				if (countdown > 0) {
					g2.setColor(Color.red);
					g2.setFont(new Font("Arial", Font.PLAIN, 70));
					g2.drawString(String.valueOf(countdown), 300, 100);
				}
				
				if (levelUp) {
					g2.setColor(Color.black);
					g2.setFont(new Font("Arial", Font.PLAIN, 40));
					g2.drawString("Level Up", 250, 50);
				}
				if (coolDown) {
					g2.setColor(Color.black);
					g2.setFont(new Font("Arial", Font.PLAIN, 40));
					g2.drawString("Cool Down", 250, 50);
				}
						
	}