|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jurpe.dungeon.PlaceHolder
public class PlaceHolder
A placeholder is the base class for every PC or NPC displayed on a map. The placeholder retains the coordinates, the color and the name of each PC and NPC shown on a HexDungeon
jurpe.dungeon.hexmap.HexDungeon
,
Serialized FormConstructor Summary | |
---|---|
PlaceHolder(Level level,
PlaceholderType phType,
java.lang.String name)
Constructor |
Method Summary | |
---|---|
java.awt.Color |
getBackgroundColor()
Background color |
Cell |
getCell()
Get RpgMapCell in which Placeholder is |
java.awt.Color |
getForegroundColor()
Foreground color |
RpgMapPoint |
getLastPosition()
Get Placeholder last position in RpgMap coordinates. |
Level |
getLevel()
Get placeholder's level |
java.lang.String |
getName()
Get the name of this placeholder |
RpgMapPoint |
getPosition()
Get Placeholder position in RpgMap coordinates |
PlaceholderType |
getType()
Return the type of this placeholder, what this placeholder stands for (monster, player, money...) |
void |
move(Direction direction)
Move placeholder |
void |
setBackgroundColor(java.awt.Color c)
Set background color |
void |
setCell(Cell c)
Set RpgMapCell in which Placeholder is |
void |
setCenteredPosition()
Set centered position for this placeholder. |
void |
setColors(java.awt.Color foreground,
java.awt.Color background)
Set background and foreground colors |
void |
setDefaultInitialPosition(java.util.Random rnd)
Set initial random position |
void |
setForegroundColor(java.awt.Color color)
Set foreground color |
void |
setLastPosition(RpgMapPoint rpgPoint)
Set Placeholder last position in RpgMap coordinates. |
void |
setLevel(Level lvl)
Set placeholder's level |
void |
setPosition(RpgMapPoint rpgPoint)
Set Placeholder Position |
void |
setRandomPosition(java.util.Random rnd)
Set a random position for this placeholder. |
java.lang.String |
toString()
Describes this placeholder |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PlaceHolder(Level level, PlaceholderType phType, java.lang.String name)
level
- Dungeon levelphType
- Type of this placeholdername
- Name of this placeholderMethod Detail |
---|
public java.lang.String getName()
public PlaceholderType getType()
public RpgMapPoint getPosition()
public RpgMapPoint getLastPosition()
public java.awt.Color getBackgroundColor()
public java.awt.Color getForegroundColor()
public void setLastPosition(RpgMapPoint rpgPoint)
rpgPoint
- position in RpgMap coordinatespublic void setColors(java.awt.Color foreground, java.awt.Color background)
foreground
- Foreground colorbackground
- Background colorpublic void setForegroundColor(java.awt.Color color)
color
- Foreground colorpublic void setBackgroundColor(java.awt.Color c)
c
- Background colorpublic Cell getCell() throws JurpeException
JurpeException
public void setCell(Cell c)
c
- Cell in which this placeholder ispublic void setPosition(RpgMapPoint rpgPoint) throws JurpeException
rpgPoint
- coordinates of RpgMap
JurpeException
public void move(Direction direction) throws JurpeException
direction
- Direction to move placeholder
JurpeException
public void setRandomPosition(java.util.Random rnd) throws JurpeException
rnd
- Random Seed
JurpeException
public java.lang.String toString()
toString
in class java.lang.Object
public void setCenteredPosition() throws JurpeException
JurpeException
public void setDefaultInitialPosition(java.util.Random rnd) throws JurpeException
rnd
- Random Seed
JurpeException
public Level getLevel()
public void setLevel(Level lvl)
lvl
- Level
|
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 |