gecco.server.core
Class UnitEvent
java.lang.Object
|
+--gecco.server.core.UnitEvent
- public class UnitEvent
- extends Object
This class encapsulates an event sent to a unit. Each event has a name and a
factor, which can be used to indicate how "strong" the event is, or similar
things.
- Author:
- Henrik Bäärnhielm, Karl Hasselström, Henrik Hägerström.
Constructor Summary |
UnitEvent(String _name,
int _factor)
Constructor for the UnitEvent object |
Method Summary |
int |
getEventId()
Gets the unique id that identifies this event. |
int |
getFactor()
Gets the factor of the event. |
String |
getName()
Gets the name of the event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnitEvent
public UnitEvent(String _name,
int _factor)
- Constructor for the UnitEvent object
- Parameters:
_name
- The name of the event._factor
- The factor of the event.
getName
public String getName()
- Gets the name of the event.
- Returns:
- The name.
getFactor
public int getFactor()
- Gets the factor of the event.
- Returns:
- The factor.
getEventId
public int getEventId()
- Gets the unique id that identifies this event.
- Returns:
- The event id.