Updating the levelManager, GameObjectFactory and GameObject
Now we can add the player (Bob), animated fire tiles and a scrolling background to the game.
In the long switch block of the LevelManager class uncomment the following highlighted code to build backgrounds, player and the animated fire tiles.
switch (levelToLoad.get(row)
.charAt(column)){
case '1':
//objects.add(factory.create(
// new BackgroundCitySpec(),
// coords));
break;
case '2':
//objects.add(factory.create(
// new BackgroundUndergroundSpec(),
// coords));
break;
case '3':
//objects.add(factory.create(
// new BackgroundMountainSpec(),
// coords));
break;
case 'p':
//objects.add(factory.create(new
// PlayerSpec(),
// coords));
// Remember the location of
// the player
//PLAYER_INDEX = objects.size...