2005-04-19 19:53:18 +00:00
|
|
|
{
|
2005-06-08 10:22:59 +00:00
|
|
|
"DEFEND_SELF" = {
|
|
|
|
"ENERGY_LOW" = ("setStateTo: FLEE");
|
|
|
|
ENTER = (performAttack);
|
|
|
|
EXIT = ();
|
|
|
|
"TARGET_DESTROYED" = ("setStateTo: TRAVEL_TO_PLANET");
|
|
|
|
UPDATE = ();
|
|
|
|
};
|
|
|
|
"EXIT_SYSTEM" = {ENTER = (performLanding); EXIT = (); UPDATE = (); };
|
2005-04-19 19:53:18 +00:00
|
|
|
FLEE = {
|
2005-06-08 10:22:59 +00:00
|
|
|
ENTER = (performFlee);
|
|
|
|
EXIT = ();
|
|
|
|
"REACHED_SAFETY" = (performIdle, "setStateTo: TRAVEL_TO_PLANET");
|
|
|
|
UPDATE = ();
|
|
|
|
};
|
|
|
|
GLOBAL = {ENTER = ("setStateTo: TRAVEL_TO_PLANET"); EXIT = (); UPDATE = (); };
|
|
|
|
"TRAVEL_TO_PLANET" = {
|
|
|
|
ATTACK = (setTargetToPrimaryAggressor, "setStateTo: DEFEND_SELF");
|
|
|
|
ENTER = (performFlyToPlanet);
|
|
|
|
EXIT = ();
|
|
|
|
"REACHED_SURFACE" = ("setStateTo: EXIT_SYSTEM");
|
|
|
|
UPDATE = ();
|
|
|
|
};
|
2005-04-19 19:53:18 +00:00
|
|
|
}
|