|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.farafin.snEADy.inOut.C_LevelLoader
public final class C_LevelLoader
This class loads level files.
FileReader
Field Summary |
---|
Constructor Summary | |
---|---|
C_LevelLoader()
|
Method Summary | |
---|---|
private D_Level |
load(java.lang.String root,
java.lang.String levName,
boolean loadPlayfield)
This method loads the level. |
D_Level |
loadLevel(java.lang.String levName)
its almost the same funktion, with the root directory of "levels". |
D_Level |
loadLevel(java.lang.String root,
java.lang.String levName)
Loads a level file into a D_Level object |
D_Level |
loadLevelHeader(java.lang.String levName)
Loads only the header of the File into a D_Level objecrt. |
D_Level |
loadLevelHeader(java.lang.String root,
java.lang.String levName)
Loads only the header of the File into a D_Level objecrt. |
private java.lang.String |
removeComents(java.lang.String str)
if a string has a coment tag '%' inside, than only the part before its first accuence will be taken and returned. |
private java.lang.String |
removeSpaces(java.lang.String str)
removes ONLY leading spaces and spaces at the end. spaces in the middle of the string are ignored |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public C_LevelLoader()
Method Detail |
---|
private java.lang.String removeComents(java.lang.String str)
str
- an string
str
befre the first '%'private java.lang.String removeSpaces(java.lang.String str)
str
-
private D_Level load(java.lang.String root, java.lang.String levName, boolean loadPlayfield) throws java.io.FileNotFoundException, E_LevelFileException
root
- the realtive root directory to snEADy mainfolderlevName
- The name of the level that should be loadedloadPlayfield
- either the Playfield should be loaded or not.
java.io.FileNotFoundException
E_LevelFileException
public D_Level loadLevelHeader(java.lang.String root, java.lang.String levName) throws E_LevelFileException, java.io.FileNotFoundException
I_LevelLoader_interface
loadLevelHeader
in interface I_LevelLoader_interface
E_LevelFileException
java.io.FileNotFoundException
public D_Level loadLevelHeader(java.lang.String levName) throws E_LevelFileException, java.io.FileNotFoundException
I_LevelLoader_interface
loadLevelHeader
in interface I_LevelLoader_interface
levName
- levName the name of the level that should be loaded. Its the name of the file, the level
may have an different name.
E_LevelFileException
- if the file was found, but in a wrong format
java.io.FileNotFoundException
- if the file was not foundI_LevelLoader_interface.loadLevelHeader(String, String)
public D_Level loadLevel(java.lang.String root, java.lang.String levName) throws E_LevelFileException, java.io.FileNotFoundException
I_LevelLoader_interface
loadLevel
in interface I_LevelLoader_interface
root
- the root-path of the levelFolder. Its only possible to point to folders which are subfolders
of the gake-folderlevName
- the name of the level that should be loaded. Its the name of the file, the level
may have an different name.
E_LevelFileException
- if the file was found, but in a wrong format
java.io.FileNotFoundException
- if the file was not foundpublic D_Level loadLevel(java.lang.String levName) throws E_LevelFileException, java.io.FileNotFoundException
I_LevelLoader_interface
loadLevel
in interface I_LevelLoader_interface
levName
- levName the name of the level that should be loaded. Its the name of the file, the level
may have an different name.
E_LevelFileException
- if the file was found, but in a wrong format
java.io.FileNotFoundException
- if the file was not foundI_LevelLoader_interface.loadLevel(String, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |