es.ucm.fdi.hysteria.game.scene
Class ReactionManager

java.lang.Object
  extended by es.ucm.fdi.hysteria.game.scene.ReactionManager
All Implemented Interfaces:
java.io.Serializable

public class ReactionManager
extends java.lang.Object
implements java.io.Serializable

This class manages multiple reactions

Author:
Sandor
See Also:
Serialized Form

Constructor Summary
ReactionManager(java.lang.String message)
          Constructor
 
Method Summary
 void addReaction(Reaction r)
          Adds a new reaction to the manager
 java.lang.String getReaction(Item i)
          This method returns the message tied to a given item, or the default one if no reaction is found
 boolean getReactionExtinguish(Item i)
           
 boolean hasReactionTo(Item i)
          It checks if a item has a reaction tied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReactionManager

public ReactionManager(java.lang.String message)
Constructor

Parameters:
message - The default message
Method Detail

getReaction

public java.lang.String getReaction(Item i)
This method returns the message tied to a given item, or the default one if no reaction is found

Parameters:
i - The item
Returns:
The message tied to the item, or the default one.

getReactionExtinguish

public boolean getReactionExtinguish(Item i)

addReaction

public void addReaction(Reaction r)
Adds a new reaction to the manager

Parameters:
r - The reaction

hasReactionTo

public boolean hasReactionTo(Item i)
It checks if a item has a reaction tied.

Parameters:
i - The item
Returns:
True if a reaction is found, false otherwise