@Override
	public void update() {
		// TODO Auto-generated method stub
		player.update();
		player.checkAttack(enemies);

		bg.setPosition(tileMap.getx(), 0);
		
		if(devil.isDead()){
			
			gsm.setState(GameStateManager.LEVEL13STATE);
			
		}
		
		tileMap.setPosition(
				0,
				GamePanel.HEIGHT / 2 - player.gety());
		
		
		if(player.isDead()){
			player.setPosition(100, 500);
			player.reset();
			//restart();
			player.revive();
		}
	
		for(int i = 0; i < enemies.size(); i++){
			Enemy e = enemies.get(i);
			e.update();
			if(player.isDrunk()){
				e.kill();
			}
			if(e.isDead()){
				enemies.remove(i);
				devil.addDefeated();
				e.addScore(Level2State.score);
				i--;
			}
		}
	}