|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.huguesjohnson.tiamat.graphics.Layer
public class Layer
class Layer - a layer (or plane) that contains drawable items
Field Summary | |
---|---|
static int |
DEFAULT_LAYER_TYPE
Default layer type. |
static int |
TYPE_DIALOG
A layer where dialogs are displayed. |
static int |
TYPE_MAP
A layer with a map associated to it. |
static int |
TYPE_SPRITE
A layer where sprites move. |
Constructor Summary | |
---|---|
Layer()
Creates new instance of Layer, uses DEFAULT_LAYER_TYPE. |
|
Layer(int type)
Creates new instance of Layer. |
|
Layer(java.lang.String mapPath,
Formatter formatter)
Creates new instance of Layer, uses TYPE_MAP. |
Method Summary | |
---|---|
Map |
getMap()
Returns the Map associated with this Layer. |
java.lang.String |
getMapPath()
Returns the relative path to the file where the Map is saved. |
java.lang.String |
getMapPathAbsolute()
Returns the absolute path to the file where the Map is saved. |
int |
getType()
Returns what type of layer this is, see TYPE constants. |
Map |
loadMap(Formatter formatter)
Loads the Map into memory and return it. |
void |
setAbsoluteDir(java.lang.String absoluteDir)
Sets the absolute path to the directory where the Map is saved. |
void |
setMapPath(java.lang.String mapPath,
Formatter formatter)
Sets the relative path to the file where the Map is saved. |
void |
setType(int type)
Sets what type of layer this is, see TYPE constants. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_MAP
public static final int TYPE_SPRITE
public static final int TYPE_DIALOG
public static final int DEFAULT_LAYER_TYPE
Constructor Detail |
---|
public Layer()
public Layer(int type)
type
- What type of layer this is, see TYPE constants.public Layer(java.lang.String mapPath, Formatter formatter)
mapPath
- The relative path to the file where the Map is saved.formatter
- The Formatter used to deserialize the Map.Method Detail |
---|
public int getType()
public void setType(int type)
type
- What type of layer this is, see TYPE constants.public Map getMap()
public Map loadMap(Formatter formatter)
formatter
- The Formatter used to deserialize the Map.
public java.lang.String getMapPath()
public java.lang.String getMapPathAbsolute()
public void setMapPath(java.lang.String mapPath, Formatter formatter)
mapPath
- The relative path to the file where the Map is saved.formatter
- The Formatter used to deserialize the Map.public void setAbsoluteDir(java.lang.String absoluteDir)
absoluteDir
- The absolute path to the directory where the Map is saved.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |