mirror of https://github.com/mgba-emu/mgba.git
Res: Add demo light sensor script
This commit is contained in:
parent
1af9831fc9
commit
76e5aa7148
|
@ -0,0 +1,8 @@
|
||||||
|
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)
|
Loading…
Reference in New Issue