- creat el object "scene", ja funcional
This commit is contained in:
20
data/scene.lua
Normal file
20
data/scene.lua
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user