Module ZoneGoal
Core -- Base class that models processes to achieve goals involving a Zone.
ZONE_GOAL models processes that have an objective with a defined achievement involving a Zone. Derived classes implement the ways how the achievements can be realized.
Author: Sven Van de Velde (FlightControl)
Global(s)
| ZONE_GOAL |
ZONE_GOAL class, extends Fsm#FSMZONE_GOAL models processes that have an objective with a defined achievement involving a Zone. |
Type ZONE_GOAL
Global(s)
- #ZONE_GOAL ZONE_GOAL
-
ZONE_GOAL class, extends Fsm#FSM
ZONE_GOAL models processes that have an objective with a defined achievement involving a Zone.
Derived classes implement the ways how the achievements can be realized.
1. ZONE_GOAL constructor
- ZONE_GOAL.New(): Creates a new ZONE_GOAL object.
2. ZONE_GOAL is a finite state machine (FSM).
2.1 ZONE_GOAL States
- Empty: The Zone is Empty.
- Guarded: The Zone is Guarded.
2.2 ZONE_GOAL Events
- **ZONE_GOAL.Guard()**: Set the Zone to Guarded.
- **ZONE_GOAL.Empty()**: Set the Zone to Empty.
Type ZoneGoal
Type SMOKECOLOR.Color
Type ZONE_GOAL
Field(s)
- ZONE_GOAL:Empty()
-
Empty Trigger for ZONE_GOAL
- ZONE_GOAL:Flare(FlareColor)
-
Flare the center of the zone.
Parameter
-
#SMOKECOLOR.Color FlareColor:
-
- #string ZONE_GOAL.FsmStateEmpty
- #string ZONE_GOAL.FsmStateGuarded
- ZONE_GOAL:GetZone()
-
Get the Zone
Return value
- ZONE_GOAL:GetZoneName()
-
Get the name of the ProtectZone
Return value
#string:
- ZONE_GOAL:Guard()
-
Guard Trigger for ZONE_GOAL
- ZONE_GOAL:New(Zone)
-
ZONE_GOAL Constructor.
Parameter
-
Core.Zone#ZONE_BASE Zone: A Zone object with the goal to be achieved.
Return value
-
- ZONE_GOAL:OnAfterEmpty(From, Event, To)
-
Empty Handler OnAfter for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL:OnAfterGuard(From, Event, To)
-
Guard Handler OnAfter for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL:OnBeforeEmpty(From, Event, To)
-
Empty Handler OnBefore for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL:OnBeforeGuard(From, Event, To)
-
Guard Handler OnBefore for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL:OnEnterEmpty(From, Event, To)
-
Empty State Handler OnEnter for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL:OnEnterGuarded(From, Event, To)
-
Guarded State Handler OnEnter for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL:OnLeaveEmpty(From, Event, To)
-
Empty State Handler OnLeave for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL:OnLeaveGuarded(From, Event, To)
-
Guarded State Handler OnLeave for ZONE_GOAL
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL:Smoke(SmokeColor)
-
Smoke the center of theh zone.
Parameter
-
#SMOKECOLOR.Color SmokeColor:
-
- ZONE_GOAL.SmokeTime
-
self.SmokeColor = nil
- ZONE_GOAL:StatusSmoke()
-
Check status Smoke.
- ZONE_GOAL:StatusZone()
-
Check status Zone.
- ZONE_GOAL:__Empty(Delay)
-
Empty Asynchronous Trigger for ZONE_GOAL
Parameter
-
#number Delay:
-
- ZONE_GOAL:__Guard(Delay)
-
Guard Asynchronous Trigger for ZONE_GOAL
Parameter
-
#number Delay:
-
- ZONE_GOAL:onafterGuard()
-
When started, check the Smoke and the Zone status.