|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.fdi.hysteria.game.scene.Reaction
public class Reaction
This class implements all that is needed to make the "characters" react to a given item. A reaction may enable or disable topics in any scene.
Constructor Summary | |
---|---|
Reaction(Item item,
java.lang.String message,
boolean extinguish)
Constructor |
Method Summary | |
---|---|
void |
addRelated(Topic t,
boolean enable)
Adds a new related topic, enabling or disabling it when the time comes. |
boolean |
extinguishesItem(Item i)
|
java.lang.String |
getMessage(Item item)
This method evaluates the item, and if it's the one stored, returns the message and enables or disables the related topics. |
boolean |
reactsTo(Item item)
Is this item the cause of the reaction? |
boolean |
wasWatched()
Was the reaction triggered? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reaction(Item item, java.lang.String message, boolean extinguish)
item
- The item to react tomessage
- The reaction messageMethod Detail |
---|
public boolean reactsTo(Item item)
item
- The item to evaluate
public boolean wasWatched()
public java.lang.String getMessage(Item item)
item
- The item
public void addRelated(Topic t, boolean enable)
t
- The topicenable
- The topic is going to be enabled, or disabled?public boolean extinguishesItem(Item i)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |