|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.jadv.client.GameData
Application that starts the JAdventure game. The JAdvClient forwards the events it handles to its GameData object and the DrawThread makes sure the GameCanvas updates properly.
Field Summary | |
private java.util.Collection |
_availableSpecies
|
private DataLevelBackground |
_background
|
private JAdvClient |
_client
|
private GameWindow |
_gameWindow
|
private java.util.Map |
_levelsMap
|
private java.util.Map |
_objectsMap
|
private ImageStore |
_pics
|
protected boolean |
dirty
|
Constructor Summary | |
GameData(JAdvClient client)
Constructor for GameData. |
Method Summary | |
java.util.Collection |
getAvailableSpecies()
|
DataLevelBackground |
getBackground()
|
protected long |
getDescription(int x,
int y)
|
java.util.Map |
getObjects()
|
ImageStore |
getPictures()
|
private JAdvEvent |
insertLevelData(LevelInformationEvent lie)
|
void |
loadLevel(java.io.File level)
Loads the specified level from disk, puts it in the levels map, and sets the current level. |
void |
loadLevels()
Loading levels blows away what was loaded previously, if anything. |
void |
loadStaticObject(java.io.File file)
|
void |
loadStaticObjects(java.lang.String forLevelName)
Reloads all the static objects for a cached level. |
JAdvEvent |
nextEvent(AvailableRacesEvent event)
|
JAdvEvent |
nextEvent(InNewLevelEvent event)
|
JAdvEvent |
nextEvent(JAdvEvent event)
Generic method for JAdvEvents that are handled yet. |
JAdvEvent |
nextEvent(LevelInformationEvent event)
|
JAdvEvent |
nextEvent(NeedLevelEvent event)
|
JAdvEvent |
nextEvent(ObjectEvent event)
|
JAdvEvent |
nextEvent(ObjectOutOfSightEvent event)
|
void |
saveLevel(java.lang.String key,
DataLevelBackground level)
|
void |
saveLevels()
Saves all the level-data in individual serialized DataLevelBackground files. |
void |
saveStaticObject(DataObject dataObject)
Caches the specified data object to the local disk. |
void |
saveStaticObjects()
Caches all static data objects for the current level to local disk. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean dirty
private JAdvClient _client
private GameWindow _gameWindow
private DataLevelBackground _background
private java.util.Collection _availableSpecies
private java.util.Map _levelsMap
private java.util.Map _objectsMap
private ImageStore _pics
Constructor Detail |
public GameData(JAdvClient client)
Method Detail |
public JAdvEvent nextEvent(JAdvEvent event)
public JAdvEvent nextEvent(LevelInformationEvent event)
public JAdvEvent nextEvent(NeedLevelEvent event)
public JAdvEvent nextEvent(InNewLevelEvent event)
public JAdvEvent nextEvent(ObjectEvent event)
public JAdvEvent nextEvent(ObjectOutOfSightEvent event)
public JAdvEvent nextEvent(AvailableRacesEvent event)
public DataLevelBackground getBackground()
public java.util.Map getObjects()
public ImageStore getPictures()
public java.util.Collection getAvailableSpecies()
public void loadLevels()
public void loadLevel(java.io.File level)
public void saveLevels()
public void saveLevel(java.lang.String key, DataLevelBackground level)
public void saveStaticObjects()
public void saveStaticObject(DataObject dataObject)
public void loadStaticObjects(java.lang.String forLevelName)
public void loadStaticObject(java.io.File file)
protected long getDescription(int x, int y)
private JAdvEvent insertLevelData(LevelInformationEvent lie)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |