mgba/res/scripts/light-oscillate.lua

9 lines
171 B
Lua
Raw Permalink Normal View History

2023-06-20 11:18:46 +00:00
local theta = 0
function readLight()
theta = math.fmod(theta + math.pi / 120, math.pi * 2)
return (math.sin(theta) + 1) * 75
end
emu:setSolarSensorCallback(readLight)