|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.haphazard.XML.MessageHandler
org.haphazard.system.action.Action
org.haphazard.system.action.CharacterAction
Field Summary | |
static int |
ATTACK
|
static int |
CARRY
|
static int |
DEFEND
|
static int |
DIE
|
static int |
DROP
|
protected Character |
mCharacter
|
static int |
MOVE
|
protected Character |
mTarget
|
protected GlobalWorld |
mWorld
|
static int |
NOTHING
|
static int |
SAY
|
static int |
WEAR
|
Fields inherited from class org.haphazard.system.action.Action |
mController, mExecutionTime, mTimeStarted |
Fields inherited from class org.haphazard.XML.MessageHandler |
mMessageBuffer |
Constructor Summary | |
CharacterAction(Character character)
Creates a new instance of CharacterAction |
Method Summary | |
boolean |
attack(Character character)
Mounts an attack on a specified character. |
boolean |
carry(Item item)
Makes the character carry an item |
boolean |
defend(Character character)
|
boolean |
die()
Makes the character die |
boolean |
drop(Item item)
Makes the character drop an item |
int |
getActionType()
Returns the action that the character is currently performing |
Character |
getCharacter()
Gets the character that is doing these actions |
boolean |
move(Point3D location)
Makes the character move |
boolean |
move(Vector3D speed)
Makes the character move |
boolean |
perform()
Performs the action |
protected boolean |
performAttack()
Performs the attack |
protected boolean |
performCarry()
Performs carry |
protected boolean |
performDeath()
Performs death |
protected boolean |
performDefend()
|
protected boolean |
performDrop()
Performs drop |
protected boolean |
performMove()
Performs the move action |
protected boolean |
performSay()
Performs say |
protected boolean |
performWear()
Performs wear |
boolean |
say(java.lang.String message)
The character exclaims something |
void |
setCharacter(Character character)
Sets the character for this controller |
boolean |
wear(Item item)
Makes the character wear an item |
Methods inherited from class org.haphazard.system.action.Action |
equals, start |
Methods inherited from class org.haphazard.XML.MessageHandler |
addMessage, getNextMessage, hasMessage |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Character mCharacter
protected GlobalWorld mWorld
protected Character mTarget
public static final int NOTHING
public static final int MOVE
public static final int ATTACK
public static final int DIE
public static final int WEAR
public static final int CARRY
public static final int DROP
public static final int DEFEND
public static final int SAY
Constructor Detail |
public CharacterAction(Character character)
character
- The character associated with this actionMethod Detail |
public void setCharacter(Character character)
character
- The character to controlpublic Character getCharacter()
public int getActionType()
public boolean perform()
perform
in class Action
public boolean move(Point3D location)
location
- The coordinates to move to
public boolean move(Vector3D speed)
speed
- the speed (and direction) the character should move in
public boolean attack(Character character)
character
- The character to attack
public boolean defend(Character character)
public boolean die()
public boolean wear(Item item)
item
- The item to wear
public boolean carry(Item item)
item
- The item to carry
public boolean drop(Item item)
item
- The item to drop
public boolean say(java.lang.String message)
message
- The thing to say
protected boolean performMove()
protected boolean performAttack()
protected boolean performDefend()
protected boolean performDeath()
protected boolean performWear()
protected boolean performCarry()
protected boolean performDrop()
protected boolean performSay()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |