|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.core.AbstractPiece us.asciiroth.client.items.AbstractItem
public abstract class AbstractItem
Abstract do-nothing implementation of an item.
Constructor Summary | |
---|---|
AbstractItem(java.lang.String name,
int flags,
Color color,
Symbol symbol)
Constructor |
|
AbstractItem(java.lang.String name,
int flags,
Symbol symbol)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getDefiniteNoun(java.lang.String phrase)
Produce the phrase with the {0} token replaced with the name of this item using a definite article. |
java.lang.String |
getIndefiniteNoun(java.lang.String phrase)
Produce the phrase with the {0} token replaced with the name of this item using an indefinite article. |
void |
onDeselect(Event event,
Cell cell)
Notification that the user is trying to deselect the item. |
void |
onDrop(Event event,
Cell cell)
Notification that the item is about to be dropped. |
Item |
onFire(Event event)
If this item can fire any kind of projectile, it should return it when this method is executed. |
void |
onHit(Event event,
Cell agentLoc,
Agent agent)
Item has touched an agent either as a result of being thrown against the agent, or as a result of the player walking into the agent while holding the item. |
void |
onSelect(Context context,
Cell cell)
Notification that the user is trying to select the item. |
void |
onSteppedOn(Event event,
Cell agentLoc,
Agent agent)
Notification that an agent has entered the same square as this item. |
void |
onThrow(Event event,
Cell cell)
Notification that the item is about to be thrown. |
void |
onThrowEnd(Event event,
Cell cell)
Notification that this item, having been thrown, has fallen to the ground at the indicated cell. |
void |
onUse(Event event)
The player has used the item without indicating any particular direction for use. |
Methods inherited from class us.asciiroth.client.core.AbstractPiece |
---|
getColor, getName, getSymbol, is, not |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface us.asciiroth.client.core.Piece |
---|
getColor, getName, getSymbol, is, not |
Constructor Detail |
---|
public AbstractItem(java.lang.String name, int flags, Color color, Symbol symbol)
name
- flags
- color
- symbol
- public AbstractItem(java.lang.String name, int flags, Symbol symbol)
name
- flags
- symbol
- Method Detail |
---|
public java.lang.String getDefiniteNoun(java.lang.String phrase)
Item
getDefiniteNoun
in interface Item
public java.lang.String getIndefiniteNoun(java.lang.String phrase)
Item
getIndefiniteNoun
in interface Item
public void onDeselect(Event event, Cell cell)
Item
onDeselect
in interface Item
public void onDrop(Event event, Cell cell)
Item
onDrop
in interface Item
public Item onFire(Event event)
Item
onFire
in interface Item
public void onHit(Event event, Cell agentLoc, Agent agent)
Item
onHit
in interface Item
public void onSelect(Context context, Cell cell)
Item
onSelect
in interface Item
public void onSteppedOn(Event event, Cell agentLoc, Agent agent)
Item
onSteppedOn
in interface Item
public void onThrow(Event event, Cell cell)
Item
onThrow
in interface Item
public void onThrowEnd(Event event, Cell cell)
Item
onThrowEnd
in interface Item
public void onUse(Event event)
Item
onUse
in interface Item
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark