@Override
	public void update() {
		//For every game object in gameObjects
		for(GameObject obj : objects)
		{
			obj.update();
		}


		//Get copyList (Avoid concurrent modification exceptions)
		ArrayList<GameObject>copyList = new ArrayList<GameObject>(toRemove);
		//remove every game object in toRemove
		for(GameObject obj : copyList)
		{
			objects.remove(obj);
		}
		toRemove.removeAll(copyList);
		
		// add in boss once all enemies are defeated
		if(Directory.profile.getEnemiesDefeated() >= numEnemies-1){
			//Create final enemy: scatterShotEnemy
			GameObject scatterEnemy = new Entity(
					Directory.screenManager.getPercentageWidth(21),		//XPos
					Directory.screenManager.getPercentageHeight(29),	//YPos
					20,													//Width
					20,													//Height
					30,													//Health
					1,													//Power
					2													//Defense
					);
	
			scatterEnemy.setShape(new Ellipse2D.Double(), Color.yellow);
			scatterEnemy.setVisible(true);
	
			scatterEnemy.setTriggerable(true);
			scatterEnemy.addTrigger(new BattleStartTrigger(new EnemyScatterShotState()));
	
			scatterEnemy.setSolid(true);
			
			addObj(scatterEnemy);
		}

		//Check for collisions
		Directory.collisionManager.update();

		//Get copyList
		copyList = new ArrayList<GameObject>(toAdd);
		//add every game object in toAdd
		for(GameObject obj : copyList)
		{
			objects.add(obj);
		}
		toAdd.removeAll(copyList);

		//Clear the queue of keypresses (Since it is not being used in this state)
		Directory.inputManager.clear();

	}