|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.huguesjohnson.tiamat.Location
public class Location
Location- represents a place a player can visit
Field Summary | |
---|---|
protected java.lang.String |
absoluteDir
|
Constructor Summary | |
---|---|
Location()
Creates a new instance of Location. |
Method Summary | |
---|---|
void |
addCharacter(LocationObjectData locationData)
Adds the Character defined by the LocationObjectData. |
void |
addCharacter(java.lang.String name)
Adds a Character with default settings. |
void |
addItem(LocationObjectData locationData)
Adds the Item defined by the LocationObjectData. |
void |
addItem(java.lang.String name)
Adds an Item with default settings. |
java.lang.String |
getBgImagePath()
Returns the relative path to the background image. |
java.lang.String |
getBgImagePathAbsolute()
Returns the absolute path to the background image. |
java.lang.String |
getBgMusicPath()
Returns the relative path to the background music. |
java.lang.String |
getBgMusicPathAbsolute()
Returns the absolute path to the background music. |
LocationObjectData[] |
getCharacters()
Returns a LocationObjectData array containing information about the Characters in the Location. |
LocationExit[] |
getExits()
Retuns all the exits from this Location. |
LocationObjectData[] |
getItems()
Returns a LocationObjectData array containing information about the Items in the Location. |
java.lang.String |
getOverlayImagePath()
Returns the relative path to the overlay image. |
java.lang.String |
getOverlayImagePathAbsolute()
Returns the absolute path to the overlay image. |
void |
onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
The onDeserialize event should be fired after an object is de-serialized. |
void |
removeCharacter(java.lang.String name)
Removes the Character with the specified name. |
void |
removeItem(java.lang.String name)
Removes the Item with the specified name. |
void |
setAbsoluteDir(java.lang.String absoluteDir)
Sets the absolute working directory for files. |
void |
setBgImagePath(java.lang.String bgImagePath)
Sets the relative path to the background image. |
void |
setBgMusicPath(java.lang.String bgMusicPath)
Sets the relative path to the background music. |
void |
setCharacters(LocationObjectData[] characters)
Sets the information about the Characters in the Location. |
void |
setExits(LocationExit[] exits)
Sets all the exits from this Location. |
void |
setItems(LocationObjectData[] items)
Sets the information about the Items in the Location. |
void |
setOverlayImagePath(java.lang.String overlayImagePath)
Sets the relative path to the overlay image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.lang.String absoluteDir
Constructor Detail |
---|
public Location()
Method Detail |
---|
public LocationExit[] getExits()
public void setExits(LocationExit[] exits)
exits
- All the exits from this Location.public java.lang.String getBgMusicPath()
public void setBgMusicPath(java.lang.String bgMusicPath)
bgMusicPath
- The relative path to the background music.public java.lang.String getBgMusicPathAbsolute()
public void setBgImagePath(java.lang.String bgImagePath)
bgImagePath
- The relative path to the background image.public java.lang.String getBgImagePath()
public java.lang.String getBgImagePathAbsolute()
public void setOverlayImagePath(java.lang.String overlayImagePath)
overlayImagePath
- The relative path to the overlay image.public java.lang.String getOverlayImagePath()
public java.lang.String getOverlayImagePathAbsolute()
public LocationObjectData[] getItems()
public void setItems(LocationObjectData[] items)
items
- A LocationObjectData array containing information about the Items in the Location.public LocationObjectData[] getCharacters()
public void setCharacters(LocationObjectData[] characters)
characters
- A LocationObjectData array containing information about the Characters in the Location.public void setAbsoluteDir(java.lang.String absoluteDir)
absoluteDir
- The full path to the working directory.public void addCharacter(java.lang.String name)
name
- The name of the Character to add.public void addCharacter(LocationObjectData locationData)
locationData
- The information about the Character.public void removeCharacter(java.lang.String name)
name
- The name of the Character to remove.public void addItem(java.lang.String name)
name
- The name of the Item to add.public void addItem(LocationObjectData locationData)
locationData
- The information about the Item.public void removeItem(java.lang.String name)
name
- The name of the Item to remove.public void onDeserialize(Formatter formatter, java.lang.String absoluteDir)
Storable
onDeserialize
in interface Storable
formatter
- the formatter to use to load any storable membersabsoluteDir
- the working directory since all paths stored in the object should be relative
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |