Files
jailsadventure2/data/wait.lua

20 lines
418 B
Lua

wait={
start_time=0,
total_time=0,
old_update=nil,
start=function(seconds)
wait.old_update=update
update=wait.update
wait.total_time=seconds
wait.start_time=sys.time()
end,
update=function()
wait.old_update()
if wait.total_time <= sys.time()-wait.start_time then
update=wait.old_update
scene.cont()
end
end
}