public void paintComponent(Graphics g){
		super.paintComponent(g);
		if(rightHeld){
			Driver.pView.imgNum = (Driver.pView.imgNum + 1) % Driver.pView.frameCount;
			Driver.player.moveRight();
		}
		if( leftHeld){
			Driver.player.moveLeft();
		}
		
		// Spawn enemies based on spawn frequency 
		if(((Driver.player.getDistTraveled() % Driver.spawner.getFreq()) == 0) && (!stopped) && (Driver.level.isSpawnArea())){
			Driver.spawner.addEnemy();
			stopped = true;
		}
		// Prevent infinite spawning, when stopped on a spawn interval
		if(((Driver.player.getDistTraveled() % Driver.spawner.getFreq()) != 0))
				stopped = false;
		repaint();
	}