mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-26 06:45:29 +00:00
29 lines
587 B
Lua
29 lines
587 B
Lua
-- 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 )
|