|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Item
Items are objects that can be picked up, moved, thrown and/or used by the player. They do not block movement into a cell.
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 interface us.asciiroth.client.core.Piece |
---|
getColor, getName, getSymbol, is, not |
Method Detail |
---|
java.lang.String getDefiniteNoun(java.lang.String phrase)
phrase
- java.lang.String getIndefiniteNoun(java.lang.String phrase)
phrase
- void onDeselect(Event event, Cell cell)
event
- cell
- void onDrop(Event event, Cell cell)
event
- cell
- Item onFire(Event event)
event
-
void onHit(Event event, Cell agentLoc, Agent agent)
event
- agentLoc
- agent
- void onSelect(Context context, Cell cell)
context
- cell
- void onSteppedOn(Event event, Cell agentLoc, Agent agent)
event
- agentLoc
- agent
- void onThrow(Event event, Cell cell)
event
- cell
- void onThrowEnd(Event event, Cell cell)
event
- cell
- void onUse(Event event)
event
-
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark