public void paintComponent(Graphics g)
	{

		if(screenNumber == 0 && fadeActive == false)
		{	//SHINE GAME CREATION LOGO CODE

			//timer = new Timer(50, this);
			g.setColor(Color.white);
			g.fillRect(0, 0, 700, 700);

			if(count < 28)
			{
				Image logoframe = logo[count].getImage();
				g.drawImage(logoframe,-20,100,this);
				if(count == 1)
				{
					try
					{
						Thread.sleep(500);
					}
					catch(Exception Q){}
				}
			}
			else
			{
				Image logoframe = logo[28].getImage();
				g.drawImage(logoframe,-20,100,this);
				if(count == 50)
				{
					screenUp = true;
					fadeActive = true;
					changeScreen = true;
					logo = null;
					ImageIcon environment = new ImageIcon("images/environment/room.png");
					background = environment.getImage();
				}
			}
			count++;

			if(count > 50)
			{
				count = 0;
				popEnemies();
			}

		}

		else if(screenNumber == 1)
		{
			g.setColor(Color.black);
			g.fillRect(0, 0, 700, 700);
			g.drawImage(background,50,25,this);
			//room.paintRoom(g);
			g.drawImage(title,0,0,this);
			if(controlsButton == true)
			{
				g.drawImage(controlsPressed,0,0,this);
			}
			if(startButton == true)
			{
				g.drawImage(startPressed,0,0,this);
			}
		}

		else if(screenNumber == 2)
		{
			if(startGame == false)
			{
				g.setColor(Color.black);
				g.fillRect(0, 0, 700, 700);
				g.drawImage(background,50,25,this);
				//room.paintRoom(g);
				paintPlayers(g);
				g.drawImage(controls,0,0,this);
				//System.out.println("ACE");
			}
			else
			{
				g.setColor(Color.black);
				g.fillRect(0, 0, 700, 700);
				//g.drawImage(background,50,25,this);
				room.paintRoom(g);
				
				if(newRoom == true)
				{
					fade(g);
				}


				if(chat == null)
				{

					title = null;
					startPressed = null;
					controlsPressed = null;
					controls = null;
					chat = new Chat();
					addKeyListener(chat);
					chatActive = true;



					if(background == null)
					{
							ImageIcon environment = new ImageIcon("images/environment/room.png");
							background = environment.getImage();
							environment = null;
					}

				}
				
				if(chatActive == true)
				{
					chat.paintChat(g);
				}
				else
				{
					if(fadeActive == false)
						paintPlayers(g);
					/*if(enemy != null)
					{
						if(player.getY() > enemy.getY() || enemy.killed == true)
						{
							enemy.paintUnit(g);
							player.paintUnit(g);
							if(enemy.killed == true)
							{
								count++;
								if(count > 20)
								{
									enemy = new DungeonEnemy(1);
									count = 0;
								}
							}

						}
						else
						{
							player.paintUnit(g);
							enemy.paintUnit(g);
						}
					}
					else
					{
						player.paintUnit(g);
					}*/
				}
			}
		}


		fade(g);




	}