|
Java Universal Role Playing Engine Version 0.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjurpe.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 |
addItemToLevel(int level,
AbstractItem itemToAdd,
PlaceholderType phType,
boolean unique)
Add an item to a dungeon level |
void |
addLevels()
Add a number of 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 created| Method Detail |
|---|
public void createLevels()
throws JurpeException
JurpeException
public void addLevels()
throws JurpeException
JurpeException
public void addItemToLevel(int level,
AbstractItem itemToAdd,
PlaceholderType phType,
boolean unique)
level - Level to add the item to (0=Village, 1=first level...)itemToAdd - The item to be addedphType - The placeholder type for a representation of this item in the mapunique - If this item has to be the only one in the levelpublic void destroyLevelFiles()
public int getNumberOfLevels()
public Level getDungeonLevel(int level)
throws JurpeException
level - int Level. If zero, returns the Village (open space).
JurpeExceptionpublic static Level restore(int level)
level - int Dungeon map level
InvalidClassException
|
Java Universal Role Playing Engine Version 0.3.9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||