info
Class PolymorphEventInfo

java.lang.Object
  extended by info.PolymorphEventInfo

public class PolymorphEventInfo
extends java.lang.Object

Used by AEventGenerator to generate proper polymorph events (with proper emotional intensity). We are continously decreasing the intensity of emotions that are triggered by repeating events - such as polymorph groaning. We store these events in this class.


Field Summary
private  java.util.ArrayList<java.lang.Double> eventCounter
          Here we store last x polymorph agent events
private  int id
          Polymorph agent id
private  double lastBiteTime
          Last time this polymorph bite us
private  double lastPolymorphEventTime
          Last time some repeating event was caused by the polymorph
 
Constructor Summary
PolymorphEventInfo(int id)
          Constructor for this class, requires polymorph id.
 
Method Summary
 java.util.ArrayList<java.lang.Double> getEventCounter()
          Gets event counter object.
 int getId()
          Gets id of the polymorph.
 double getLastBiteTime()
          Gets last time the polymorph has bitten us.
 double getLastPolymorphEventTime()
          Gets last time the polymorph has caused some event.
 void setId(int id)
          Sets id of this polymorph.
 void setLastPolymorphEventTime(double lastPolymorphEventTime)
          Sets last time the polymorph caused some event.
 void updateAction(ActionType type, double currentTime)
          Updates this class internal variables according to the action the polymorph have made to us.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private int id
Polymorph agent id


lastPolymorphEventTime

private double lastPolymorphEventTime
Last time some repeating event was caused by the polymorph


eventCounter

private java.util.ArrayList<java.lang.Double> eventCounter
Here we store last x polymorph agent events


lastBiteTime

private double lastBiteTime
Last time this polymorph bite us

Constructor Detail

PolymorphEventInfo

public PolymorphEventInfo(int id)
Constructor for this class, requires polymorph id.

Parameters:
id - polymorph id
Method Detail

getId

public int getId()
Gets id of the polymorph.

Returns:
polymorph id

setId

public void setId(int id)
Sets id of this polymorph.

Parameters:
id - new id

getLastPolymorphEventTime

public double getLastPolymorphEventTime()
Gets last time the polymorph has caused some event.

Returns:
last polymorph event time

setLastPolymorphEventTime

public void setLastPolymorphEventTime(double lastPolymorphEventTime)
Sets last time the polymorph caused some event.

Parameters:
lastPolymorphEventTime - new time

getEventCounter

public java.util.ArrayList<java.lang.Double> getEventCounter()
Gets event counter object.

Returns:
event counter object

getLastBiteTime

public double getLastBiteTime()
Gets last time the polymorph has bitten us.

Returns:
last polymorph bite time

updateAction

public void updateAction(ActionType type,
                         double currentTime)
Updates this class internal variables according to the action the polymorph have made to us. Right now the polymorph just can bite us, nothing else.

Parameters:
type - type of the action
currentTime - time of the action