|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--DE.purple_sunshine.bigbro.Person
A Person represents a real person in the bb-house. It can compute a new position according to a certain time.
| Field Summary | |
boolean |
fadeIn
|
| Constructor Summary | |
Person(java.lang.String id,
java.awt.Color color,
House house)
Constructs a new Person. |
|
| Method Summary | |
void |
computePosition(double frac)
Computs the current position of this person within its current path. |
java.awt.Color |
getColor()
|
java.lang.String |
getId()
Returns the id of this person. |
java.awt.Point |
getPosition()
Returns the current position of this person. |
void |
moveTo(PathArea target)
Gives the person a new target to move to. |
void |
moveTo(PathElement target)
Gives the person a new target to move to. |
void |
moveTo(java.lang.String target)
Gives the person a new target to move to. |
void |
moveToRandom()
Makes the person move to a random PathArea. |
void |
paintInto(java.awt.Graphics g)
Paints this person at its current position into g |
void |
resetTime()
Switches the current path to the next path and resets pathStep. |
void |
setColor(java.awt.Color color)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public boolean fadeIn
| Constructor Detail |
public Person(java.lang.String id,
java.awt.Color color,
House house)
id - the unique ID of this personcolor - the color in which this person shall be paintedhouse - the house within which this person moves around| Method Detail |
public void computePosition(double frac)
frac - a value between 0.0 and 1.0 that indicates how much time has
passed since the last position update, and how much time is still
leftpublic java.awt.Point getPosition()
public java.lang.String getId()
public void paintInto(java.awt.Graphics g)
gg - the Graphics instance to paint intopublic java.awt.Color getColor()
public void setColor(java.awt.Color color)
public void moveTo(java.lang.String target)
target - the target as a Stringpublic void moveTo(PathElement target)
target - the target as a PathElementpublic void moveTo(PathArea target)
target - the target as a PathElementpublic void moveToRandom()
House.getRandomPathArea()public void resetTime()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||