- creat el object "scene", ja funcional

This commit is contained in:
2023-01-31 15:20:19 +01:00
parent ac1b6cb21e
commit f03ed38d77
5 changed files with 34 additions and 13 deletions

20
data/scene.lua Normal file
View File

@@ -0,0 +1,20 @@
scene={
script=nil,
pos=0,
start=function(script)
scene.pos=0
scene.script=script
scene.cont()
end,
cont=function()
if scene.script==nil then return end
scene.pos=scene.pos+1
if scene.script[scene.pos]==nil then
scene.script=nil
return
end
scene.script[scene.pos]()
end
}