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.

Field Summary
private  int eventId
          Description of the Field
private  int factor
          Description of the Field
private static int idCounter
          Description of the Field
private  String name
          Description of the Field
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

eventId

private int eventId
Description of the Field

factor

private int factor
Description of the Field

name

private String name
Description of the Field

idCounter

private static int idCounter
Description of the Field
Constructor Detail

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.
Method Detail

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.