mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Got CARGO working now with new FSM mechanism
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- This test will schedule the same function 2 times.
|
||||
|
||||
SpawnTest = SPAWN:New( "Test" )
|
||||
TestZone = ZONE:New( "TestZone" )
|
||||
|
||||
local function MessageTest2()
|
||||
|
||||
SpawnTest:SpawnInZone( TestZone, true )
|
||||
|
||||
end
|
||||
|
||||
local function MessageTest1()
|
||||
|
||||
SpawnTest:SpawnInZone( TestZone, true )
|
||||
|
||||
-- The second after 10 seconds
|
||||
SCHEDULER:New( nil, MessageTest2, {}, 5 )
|
||||
|
||||
-- The third after 15 seconds
|
||||
SCHEDULER:New( nil, MessageTest2, {}, 10 )
|
||||
|
||||
end
|
||||
|
||||
-- The first after 5 seconds
|
||||
SCHEDULER:New( nil, MessageTest1, {}, 5 )
|
||||
|
||||
-- The fourth after 20 seconds
|
||||
SCHEDULER:New( nil, MessageTest1, {}, 20 )
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
-- This test will schedule the same function 2 times.
|
||||
|
||||
SpawnTest = SPAWN:New( "Test" )
|
||||
TestZone = ZONE:New( "TestZone" )
|
||||
|
||||
local function MessageTest()
|
||||
|
||||
SpawnTest:SpawnInZone( TestZone, true )
|
||||
|
||||
end
|
||||
|
||||
-- The first after 5 seconds
|
||||
TestScheduler1 = SCHEDULER:New( nil, MessageTest, {}, 5 )
|
||||
|
||||
-- The second after 10 seconds
|
||||
TestScheduler2 = SCHEDULER:New( nil, MessageTest, {}, 10 )
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
GroupTest = GROUP:FindByName("Test")
|
||||
|
||||
TestScheduler = SCHEDULER:New( nil,
|
||||
function()
|
||||
|
||||
MESSAGE:New("Hello World", 5 ):ToAll()
|
||||
|
||||
end, {}, 10, 10 )
|
||||
Binary file not shown.
Reference in New Issue
Block a user