|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.adom.jade.world.LocationManager
Handles all locations of the game. The manager is responsible for storing the locations on hard disk if the ressources are in danger to become exhausted and retrieving the locations, if they are required.
Currently all locations are stored in memory. At some point this behaviour will have to be modified.
| Constructor Summary | |
|---|---|
LocationManager()
Creates an empty location manager. |
|
| Method Summary | |
|---|---|
void |
addLocation(Location location)
Adds a new location to the location manager. |
void |
connect(int x1,
int y1,
Location location1,
int x2,
int y2,
Location location2)
Connects to locations. |
Location |
getCurrentLocation()
Returns the current location used by the world for map display. |
Location |
getLocation(java.lang.String logicalName)
Retrieves a location based on its logical name. |
void |
setCurrentLocation(Location location)
Defines the current location on which the PC is active. |
boolean |
switchLocation(Being being,
Connection connection)
Switches the location for the given being. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocationManager()
| Method Detail |
|---|
public void addLocation(Location location)
location - the location to addpublic Location getLocation(java.lang.String logicalName)
logicalName - the logical name of the location to be
retrieved
public void setCurrentLocation(Location location)
location - the new current locationpublic Location getCurrentLocation()
public void connect(int x1,
int y1,
Location location1,
int x2,
int y2,
Location location2)
x1 - the x position of the first locationy1 - the y position of the first locationlocation1 - the first locationx2 - the x position of the second locationy2 - the y position of the second locationlocation2 - the second location
public boolean switchLocation(Being being,
Connection connection)
being - the being to switch the locationconnection - the connection used to switch locations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||