Files
cacaus-arcade/data/live_scene.lua
T
JailGamer 83720a8b69 [NEW] Mòdul Live scene per a escenes de joc
[NEW] Modificat mòdul flow per a poder afegir registres que no se van a executar inmediatament i així programar escenes encadenades
2026-05-09 22:31:11 +02:00

44 lines
958 B
Lua

live_scene = {
--scene_update = nil,
--scene_end = nil,
}
-- function live_scene.scene_update()
-- -- buida
-- end
--
-- function live_scene.scene_end()
-- -- buida
-- end
function live_scene.update_stage1_ending()
print("UPDATING")
flow:next()
end
function live_scene.end_stage1_ending()
print("END")
flow:finish()
end
function live_scene.start( name, op )
local flow_name = "live_scene_"..name
local update_func = live_scene["update_"..name]
local end_func = live_scene["end_"..name]
--live_scene.scene_update = update_func
--live_scene.scene_end = end_func
print("LIVE SCENE START")
if op=="add" then
print("ADD")
flow:registrar(flow_name,{update_func,end_func})
flow:add(flow_name);
else
print("EXEC")
flow:executar("live_scene", true);
end
end
flow:registrar("live_scene",{
live_scene.scene_update,
live_scene.scene_end
})