|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--wworld.WorldObject | +--wworld.GridObject | +--wworld.MovingObject | +--wworld.Actor
This class specializes the MovingObject class to include a State that each moving object can have.
Constructor Summary | |
Actor(int objType,
int x,
int y,
int o,
int idnumber,
java.lang.String name)
Constructor that takes in the ObjectType, GridLocation in terms of x and y, the orientation o, the id number of the Actor, and the name assigned to the actor. |
Method Summary | |
int |
getActorId()
Returns the ID of the Actor as an integer. |
java.lang.String |
getActorName()
Returns the Name of the actor. |
ActorState |
getState()
Returns the State of the Actor as being ActorState.ALIVE, ActorState.DEAD or ActorState.VICTORIOUS. |
void |
setState(int s)
Allows the simulator to set the State of the Actor. |
Methods inherited from class wworld.MovingObject |
getOrientation, getOrientationDirection, getOrigOrientation, move, setOrientation, turnLeft, turnRight |
Methods inherited from class wworld.GridObject |
getLocation, getOrigLocation, setLocation, setLocation |
Methods inherited from class wworld.WorldObject |
getType, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Actor(int objType, int x, int y, int o, int idnumber, java.lang.String name)
Method Detail |
public int getActorId()
public java.lang.String getActorName()
public ActorState getState()
public void setState(int s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |