public void keyPressed (KeyEvent e){
		int key = e.getKeyCode();
		
		for  (int i = 0; i<objectHandler.object.size();i++){
			GameObject tempObject = objectHandler.object.get(i);
			if (tempObject.getId() == ObjectId.Player){
				if(key == KeyEvent.VK_RIGHT) tempObject.setVelocityX(5);
				if(key == KeyEvent.VK_LEFT) tempObject.setVelocityX(-5);
				if(key == KeyEvent.VK_SPACE && !tempObject.isJumping()){
					
					tempObject.setY(-10);
				}
			}
		}
		if (key == KeyEvent.VK_ESCAPE){
			System.exit(1);
		}
		
	}