|
|||||||||
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 us.asciiroth.client.items.Scroll
public class Scroll
A scroll that will display an HTML page in a modal dialog. The url you provide should be relative to the scenario URL (the text must be distributed as part of the scenario). Scrolls have a name in order to distinguish them since their contents differ.
A scroll can be created without an URL to a document to read. In that case, it works more like a marker piece. For example, an NPC could give the player a "Writ of Introduction" that just serves to unlock another part of the game.
Field Summary | |
---|---|
static Serializer<Scroll> |
SERIALIZER
Type serializer. |
Constructor Summary | |
---|---|
Scroll(java.lang.String name)
Constructor. |
|
Scroll(java.lang.String name,
java.lang.String url)
Constructor. |
Method Summary | |
---|---|
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. |
java.lang.String |
getName()
The visible name of the piece. |
void |
onUse(Event event)
The player has used the item without indicating any particular direction for use. |
Methods inherited from class us.asciiroth.client.items.AbstractItem |
---|
getDefiniteNoun, onDeselect, onDrop, onFire, onHit, onSelect, onSteppedOn, onThrow, onThrowEnd |
Methods inherited from class us.asciiroth.client.core.AbstractPiece |
---|
getColor, 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, getSymbol, is, not |
Field Detail |
---|
public static final Serializer<Scroll> SERIALIZER
Constructor Detail |
---|
public Scroll(java.lang.String name)
name
- public Scroll(java.lang.String name, java.lang.String url)
name
- the name to show as part of the scroll's labelurl
- the url to load when the scroll is read, which should be
relative to the base folder of the scenario.Method Detail |
---|
public java.lang.String getIndefiniteNoun(java.lang.String phrase)
Item
getIndefiniteNoun
in interface Item
getIndefiniteNoun
in class AbstractItem
public java.lang.String getName()
Piece
getName
in interface Piece
getName
in class AbstractPiece
public void onUse(Event event)
Item
onUse
in interface Item
onUse
in class AbstractItem
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark