@Override
	public void initResources() {
		initialScreen = true;
		bossLoaded = false;
		myBarrierGroup = new SpriteGroup("barrier");
		myPlayerGroup = new SpriteGroup("player");

		myEnemyGroup = new SpriteGroup("enemy");
		myProjectileGroup = new SpriteGroup("projectile");
		myEnemyProjectileGroup = new SpriteGroup("enemy projectile");
		myCompanionGroup = new SpriteGroup("companion");

		
		// init boss
		myBoss = new Boss();
		try {
			myBoss.load(this);
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		BossWeakPoints = myBoss.getSpriteGroup();
		BossProjectiles = myBoss.getProjectiles();
		
		// init background using the new Map class
		myBackImage = getImage("resources/BackFinal.png");
		myMap = new Map(myBackImage, getWidth(), getHeight());

		myMap.setSpeed(10);
		myBackground = myMap.getMyBack();

		myPlayerGroup.setBackground(myBackground);

		myBarrierGroup.setBackground(myBackground);
		myEnemyGroup.setBackground(myBackground);
		myCompanionGroup.setBackground(myBackground);
		myProjectileGroup.setBackground(myBackground);
		myEnemyProjectileGroup.setBackground(myBackground);
		BossWeakPoints.setBackground(myBackground);
		BossProjectiles.setBackground(myBackground);
		//myShip = new Player(200, 2700, "resources/ship.png");
		//myShip.setImage(getImage("resources/ship.png"));
		//System.out.println("1");

		start = new StartGUIUpdated(this);
		
		
		
//		InvisibilityDecorator myInv = new InvisibilityDecorator(new SimplePowerUp(), myShip); 
//		myPowerUpDecorator = new CompanionDecorator(myInv, myShip);
		
		//decCompanion = new ConstantlyMoveDecorator(new SimpleShip()); 
		
		//intit weapons
		Projectile p = new DamagingProjectile("resources/fire.png",myProjectileGroup,1);
		p.setImage(getImage("resources/fire.png"));
		ShotPattern s = new SinglePattern(-1);
		myWeapon = new UnlimitedGun(300,p,s);


		// init playfield
		myPlayfield = new PlayField(myBackground);
//		myPlayfield.add(myBoss);
		myPlayfield.addGroup(myPlayerGroup);
		myPlayfield.addGroup(myBarrierGroup);
		myPlayfield.addGroup(myEnemyGroup);
		myPlayfield.addGroup(myProjectileGroup);
		//myPlayfield.addGroup(myCompanionGroup);
		myPlayfield.addGroup(myEnemyProjectileGroup);
//		myPlayfield.addGroup(BossProjectiles);
//		myPlayfield.addGroup(BossWeakPoints);

		myPlayfield.addCollisionGroup(myPlayerGroup, myBarrierGroup,
				new PlayerBarrierCollision());
		myPlayfield.addCollisionGroup(myProjectileGroup, myEnemyGroup, new ProjectileAnythingCollision());
		myPlayfield.addCollisionGroup(myProjectileGroup, myBarrierGroup, new ProjectileAnythingCollision());
		myPlayfield.addCollisionGroup(myEnemyProjectileGroup, myPlayerGroup, new ProjectileAnythingCollision());
		myPlayfield.addCollisionGroup(myEnemyProjectileGroup, myBarrierGroup, new ProjectileAnythingCollision());
//		myPlayfield.addCollisionGroup(BossWeakPoints, myProjectileGroup, new FireBossCollision()); 
//		myPlayfield.addCollisionGroup(BossProjectiles, myPlayerGroup, new ProjectileAnythingCollision());

		// load level data
		//loadLevelData();
		

		// initializing PlayerInfo
		playerInfo = new PlayerInfo();		
		//HealthBar
		myHealthBar = new HealthBar(myPlayer); 


	}