mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OK. got workiing prototype now, works!
This commit is contained in:
parent
ae1aeac6ce
commit
4ac962a87a
@ -108,6 +108,7 @@ function STATEMACHINE:_create_transition(name)
|
||||
|
||||
local fsmparent, event = self:_isendstate( to )
|
||||
if fsmparent and event then
|
||||
self:_call_handler(self["onstatechange"], params)
|
||||
fsmparent[event]( fsmparent )
|
||||
else
|
||||
self:_call_handler(self["onenter" .. to] or self["on" .. to], params)
|
||||
|
||||
@ -43,7 +43,8 @@ function TASK2_SEAD:New( Client, Mission, TargetSet )
|
||||
onMoreTargets = self.OnMoreTargets,
|
||||
onDestroyed = self.OnDestroyed,
|
||||
onKilled = self.OnKilled,
|
||||
}
|
||||
},
|
||||
endstates = { 'Success', 'Failed' }
|
||||
} )
|
||||
|
||||
|
||||
|
||||
@ -20,8 +20,8 @@ local Task_Sead = STATEMACHINE:New( {
|
||||
{ name = 'Start', from = 'None', to = 'Unassigned' },
|
||||
{ name = 'Next', from = 'Unassigned', to = 'Assigned' },
|
||||
-- { name = 'Route', from = 'Assigned', to = 'Arrived' },
|
||||
{ name = 'Next', from = 'Assigned', to = 'Seading' },
|
||||
{ name = 'Destroyed', from = 'Destroy', to = 'Success' },
|
||||
{ name = 'Next', from = 'Assigned', to = 'Success' },
|
||||
{ name = 'Failed', from = 'Assigned', to = 'Failed' },
|
||||
},
|
||||
subs = {
|
||||
Menu = { onstateparent = 'Unassigned', oneventparent = 'Start', fsm = Task_Menu.Fsm, event = 'Menu', returnevents = { 'Next' } },
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user