private void gameLogic() {
		for(Enemy e : Entities.getEnemies()) {
			e.moveTowardsTarget();
		}
		
		for(Player p : Entities.getPlayers()) {
			double dist = distance;
			if(p.getController().getKey(Controller.Keys.JUMP).isKeyPressed()) {
				p.getController().getKey(Controller.Keys.JUMP).unPress();
				if(p.getHops() < 2){
					p.incrementHops();
					p.getVelocity().shift(0, jumpvelocity);
				}
			}
			if(p.getController().getKey(Controller.Keys.FIRE).isKeyDown()) {
				
			}
			if(p.getController().getKey(Controller.Keys.LEFT).isKeyDown()) { //left
				Vector2D v = p.getVelocity();
				v.setX(Math.max(v.getX()-2*playermovement, -dist)); //we need 2*playermovement because physics() slows it down.
			}
			if(p.getController().getKey(Controller.Keys.RIGHT).isKeyDown()) { //right
				Vector2D v = p.getVelocity();
				v.setX(Math.min(v.getX()+2*playermovement, dist)); //we need 2*playermovement because physics() slows it down.
			}
		}
	}