mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Add arg to show strings of timers in EventSequences and allow them to be paused.
This commit is contained in:
parent
01acec248c
commit
a966bd491e
1 changed files with 24 additions and 1 deletions
|
@ -5,7 +5,7 @@ local EventSequence
|
|||
LevelVars.__TEN_eventSequence = {sequences = {}}
|
||||
|
||||
EventSequence = {
|
||||
Create = function(name, ...)
|
||||
Create = function(name, showString, ...)
|
||||
local obj = {}
|
||||
local mt = {}
|
||||
mt.__index = EventSequence
|
||||
|
@ -56,6 +56,7 @@ EventSequence = {
|
|||
-- final timer
|
||||
LevelFuncs[funcName] = function(...)
|
||||
LevelFuncs[func](...)
|
||||
Timer.Get(timerName):Stop()
|
||||
thisES.currentTimer = 1
|
||||
end
|
||||
end
|
||||
|
@ -74,6 +75,28 @@ EventSequence = {
|
|||
return obj
|
||||
end;
|
||||
|
||||
Get = function(name)
|
||||
if LevelVars.__TEN_eventSequence.sequences[name] then
|
||||
local obj = {}
|
||||
local mt = {}
|
||||
mt.__index = EventSequence
|
||||
setmetatable(obj, mt)
|
||||
obj.name = name
|
||||
return obj
|
||||
end
|
||||
return nil
|
||||
end,
|
||||
|
||||
Pause = function(t)
|
||||
local thisES = LevelVars.__TEN_eventSequence.sequences[t.name]
|
||||
Timer.Get(thisES.timers[thisES.currentTimer]):Pause()
|
||||
end,
|
||||
|
||||
Stop = function(t)
|
||||
local thisES = LevelVars.__TEN_eventSequence.sequences[t.name]
|
||||
Timer.Get(thisES.timers[thisES.currentTimer]):Stop()
|
||||
end,
|
||||
|
||||
Start = function(t)
|
||||
local thisES = LevelVars.__TEN_eventSequence.sequences[t.name]
|
||||
Timer.Get(thisES.timers[thisES.currentTimer]):Start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue