|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jurpe.dungeon.DungeonLevels
public class DungeonLevels
Dungeon Levels class. This class handles the persistance of dungeon levels on files. When it is first called it initialize the initial number of levels. With "createDungeons()" it creates the village (openspace) dungeon plus the number of dungeons in numberOfLevels. When created, the dungeon is serialized. Through "getDungeonLevel(int)" this class returns the related RpgMap object deserializing it from the disk.
Constructor Summary | |
---|---|
DungeonLevels(Dungeons inDungeon,
int levels)
Constructor |
Method Summary | |
---|---|
void |
addLevels()
Add LEVELS_GAP levels to the dungeon. |
void |
createLevels()
Create dungeon levels. |
void |
destroyLevelFiles()
Delete level files |
Level |
getDungeonLevel(int level)
Get the dungeon map associated with that level |
int |
getNumberOfLevels()
Get number of levels |
static Level |
restore(int level)
Get a serialized Level |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DungeonLevels(Dungeons inDungeon, int levels)
inDungeon
- Handle to dungeonlevels
- int Initial Number of dungeons to be createdMethod Detail |
---|
public void createLevels()
public void addLevels()
public void destroyLevelFiles()
public int getNumberOfLevels()
public Level getDungeonLevel(int level) throws JurpeException
level
- int Level. If zero, returns the Village (open space).
JurpeException
public static Level restore(int level) throws java.io.InvalidClassException
level
- int Dungeon map level
java.io.InvalidClassException
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |