| Function | Returns | Description |
|---|---|---|
globals.curtime | number | Game current time |
globals.realtime | number | Real elapsed time |
globals.frametime | number | Frame delta time |
globals.interval | number | Tick interval (1/64) |
globals.tickcount | number | Global tick count |
globals.framecount | number | Global frame count |
Example
events.on('paint', function()
local t = globals.curtime
local alpha = math.floor((math.sin(t * 4) * 0.5 + 0.5) * 255)
render.rect_filled(10, 10, 100, 4, color(255, 255, 255, alpha))
end)