|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<EventKind>
universum.bi.EventKind
public enum EventKind
Kind of an event. Actually encodes both events and actions, actions can be taken by being, and returned by makeTurn(), and events come to being's processEvent().
BeingInterface
,
Being
Enum Constant Summary | |
---|---|
ACTION_ATTACK
Attack another creature, parameter is id of creature to be attacked. |
|
ACTION_BORN
Give birth to another creature, parameter is BeingParams of creature it wishes to give birth to, and it must not vary to much from being's own parameters. |
|
ACTION_EAT
Consume energy from the outside world. |
|
ACTION_GIVE
Give energy to another creature, it must also belong to you and be on the same cell. |
|
ACTION_MOVE_ATTACK
Attack another creature and move to the place where it is. |
|
ACTION_MOVE_TO
Move to particular location, parameter is location where being wishes to move. |
|
ACTION_PRODUCE
Produce a non-living entity. |
|
BEING_ATTACKED
Event received when other being attacks us, has amount of damage inflicted as parameter, and sender() is id of being who did this damage to us. |
|
BEING_BORN
Very first event being receives, as parameters contains BeingParams of this being passed by parent (can include arbirary parameter). |
|
BEING_DEAD
Very last event being receives, notifies about its death, has no paramters. |
|
BEING_ENERGY_GIVEN
Event received when got energy from other beings, parameter is amount of energy given (only your creatures can heal each another). |
|
BEING_PRODUCED
Notification on entity production. |
|
UNKNOWN
Unknown event |
Method Summary | |
---|---|
static EventKind |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static EventKind[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final EventKind UNKNOWN
public static final EventKind BEING_BORN
ACTION_BORN
public static final EventKind BEING_PRODUCED
ACTION_PRODUCE
public static final EventKind BEING_DEAD
public static final EventKind BEING_ATTACKED
ACTION_ATTACK
public static final EventKind BEING_ENERGY_GIVEN
ACTION_GIVE
public static final EventKind ACTION_MOVE_TO
BeingInterface.getReachableLocations(Being)
,
Constants.K_movecost
public static final EventKind ACTION_BORN
Constants.K_borncost
,
Constants.K_minbornvariation
,
Constants.K_maxbornvariation
,
BEING_BORN
public static final EventKind ACTION_PRODUCE
BEING_PRODUCED
public static final EventKind ACTION_ATTACK
Constants.K_fight
,
Constants.K_retaliate
,
BEING_ATTACKED
public static final EventKind ACTION_MOVE_ATTACK
Constants.K_fight
,
Constants.K_retaliate
,
Constants.K_fightmovepenalty
,
BEING_ATTACKED
public static final EventKind ACTION_EAT
Constants.K_bite
,
BeingInterface
public static final EventKind ACTION_GIVE
BEING_ENERGY_GIVEN
Method Detail |
---|
public static EventKind[] values()
for (EventKind c : EventKind.values()) System.out.println(c);
public static EventKind valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |