mirror of
https://github.com/libretro/mgba.git
synced 2024-11-23 07:59:46 +00:00
Res: Add demo light sensor script
This commit is contained in:
parent
1af9831fc9
commit
76e5aa7148
8
res/scripts/light-oscillate.lua
Normal file
8
res/scripts/light-oscillate.lua
Normal file
@ -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
Block a user