@love event $name { } @love event $name $a { } @love event $name $a $b { } @love event $name $a $b $c { } @love event $name $a $b $c $d { } @love event $name $a $b $c $d $e { } @love event $name $a $b $c $d $e $f { } @ initialize LOVE event handlers { @code [ function love.run() -- if love.load then love.load(love.arg.parseGameArguments(arg), arg) end if love.timer then love.timer.step() end local dt = 0 return function() if love.event then love.event.pump() for name, a,b,c,d,e,f in love.event.poll() do self:fact("@love", "event", name, a, b, c, d, e, f) self:run() if name == "quit" and not self:take("@keep running") then return a or 0 end end end if love.timer then dt = love.timer.step() end self:fact("@love", "event", "update", dt) self:run() if love.graphics and love.graphics.isActive() then love.graphics.origin() love.graphics.clear(love.graphics.getBackgroundColor()) self:fact("@love", "event", "draw") self:run() love.graphics.present() end if love.timer then love.timer.sleep(0.001) end end end ] }