mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Improve EventSequence example.
This commit is contained in:
parent
a52177e34c
commit
fcf96568f9
1 changed files with 14 additions and 11 deletions
|
@ -22,17 +22,20 @@
|
||||||
-- LevelFuncs.TriggerSequence = function(obj)
|
-- LevelFuncs.TriggerSequence = function(obj)
|
||||||
-- local posSteve = TEN.Objects.GetMoveableByName("stevePosNullmesh"):GetPosition()
|
-- local posSteve = TEN.Objects.GetMoveableByName("stevePosNullmesh"):GetPosition()
|
||||||
-- local posChris = TEN.Objects.GetMoveableByName("chrisPosNullmesh"):GetPosition()
|
-- local posChris = TEN.Objects.GetMoveableByName("chrisPosNullmesh"):GetPosition()
|
||||||
-- local mySeq = EventSequence.Create("my_seq",
|
-- local mySeq = EventSequence.Get("my_seq")
|
||||||
-- false, -- does not loop
|
-- if not mySeq then
|
||||||
-- {seconds = true, deciseconds = true}, -- timer format, see Timer for details
|
-- mySeq = EventSequence.Create("my_seq",
|
||||||
-- 6, -- seconds until call the function specified in next arg
|
-- false, -- does not loop
|
||||||
-- LevelFuncs.HealLara, -- first function to call. If we don't need to pass any arguments, we can just pass the function
|
-- {seconds = true, deciseconds = true}, -- timer format, see Timer for details
|
||||||
-- 2.1, -- seconds until the next function, after the previous one has been called
|
-- 6, -- seconds until call the function specified in next arg
|
||||||
-- {LevelFuncs.SpawnBaddy, TEN.Objects.ObjID.BADDY1, "steve", posSteve}, -- if we DO want to pass arguments to the function to be called, we give a table with the function (LevelFuncs.SpawnBaddy in this case) followed by the args to pass to it
|
-- LevelFuncs.HealLara, -- first function to call. If we don't need to pass any arguments, we can just pass the function
|
||||||
-- 0.5,
|
-- 2.1, -- seconds until the next function, after the previous one has been called
|
||||||
-- {LevelFuncs.SpawnBaddy, TEN.Objects.ObjID.SAS_CAIRO, "chris", posChris},
|
-- {LevelFuncs.SpawnBaddy, TEN.Objects.ObjID.BADDY1, "steve", posSteve}, -- if we DO want to pass arguments to the function to be called, we give a table with the function (LevelFuncs.SpawnBaddy in this case) followed by the args to pass to it
|
||||||
-- 1,
|
-- 0.5,
|
||||||
-- LevelFuncs.HealLara)
|
-- {LevelFuncs.SpawnBaddy, TEN.Objects.ObjID.SAS_CAIRO, "chris", posChris},
|
||||||
|
-- 1,
|
||||||
|
-- LevelFuncs.HealLara)
|
||||||
|
-- end
|
||||||
--
|
--
|
||||||
-- -- event sequences are inactive to begin with and so need to be started
|
-- -- event sequences are inactive to begin with and so need to be started
|
||||||
-- mySeq:Start()
|
-- mySeq:Start()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue