Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xml
Class LocationLoader

    java.lang.Object
      xml.LocationLoader

    public class LocationLoader

extends java.lang.Object

This class represents a loaction loader that can be used to load game location specifications from xml files

Author:
  Frank Bruns

Constructor Summary
`LocationLoader(com.golden.gamedev.engine.BaseLoader bsLoader, com.golden.gamedev.engine.BaseInput bsInput, com.golden.gamedev.engine.BaseAudio bsSound, com.golden.gamedev.engine.BaseAudio bsMusic)`

Method Summary
`java.util.ArrayList<GameLocation>` | `getLocationFromXML(java.util.List<java.io.File> xmlFiles)` Returns the list of game locations specified by the xml files from the file names array
`java.util.ArrayList<GameLocation>` | `getLocationsWithAddedExits(java.util.ArrayList<GameLocation> locations)` Method to add the locatios exits to the list of game locations.
`java.util.ArrayList<GameLocation>` | `getLocationsWithAddedPlayer(java.util.ArrayList<GameLocation> locations)` Method to add the player to the list of game locations.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocationLoader

    public LocationLoader(com.golden.gamedev.engine.BaseLoader bsLoader,
                          com.golden.gamedev.engine.BaseInput bsInput,
                          com.golden.gamedev.engine.BaseAudio bsSound,
                          com.golden.gamedev.engine.BaseAudio bsMusic)

Method Detail

### getLocationFromXML

    public java.util.ArrayList<GameLocation> getLocationFromXML(java.util.List<java.io.File> xmlFiles)

  Returns the list of game locations specified by the xml files from the file names array

  Parameters:
    `xmlFiles` - xml files that specify the game locations
  Returns:
    list of game locations

### getLocationsWithAddedExits

    public java.util.ArrayList<GameLocation> getLocationsWithAddedExits(java.util.ArrayList<GameLocation> locations)

  Method to add the locatios exits to the list of game locations. The information will be retrieved from the xml files
  Note: Call this method after all game locations have been initialized.

  Parameters:
    `locations` - list of existing game locations

### getLocationsWithAddedPlayer

    public java.util.ArrayList<GameLocation> getLocationsWithAddedPlayer(java.util.ArrayList<GameLocation> locations)

  Method to add the player to the list of game locations. The information will be retrieved from the player.xml file
  Note: Call this method after all game locations have been initialized.

  Parameters:
    `locations` - list of existing game locations

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD