如何让屏幕在 lua 电晕中始终保持清醒?
how to make screen always awake in lua corona?
我在游戏中使用 Corona,但当我将 Android 智能手机内置时,出现屏幕无法保持亮起(进入休眠状态)的问题。我的问题是如何让屏幕保持与屏幕交互?
您可以使用system.setIdleTimer()
来控制空闲计时器。
Controls whether the idle timer is enabled. If set to true, the timer will be active (default) or inactive if false. When active, the idle timer dims the screen and eventually puts the device to sleep when no user activity occurs (e.g. screen touches).
示例:
system.setIdleTimer(false) -- Screen does not turn off automatically
system.setIdleTimer(true) -- Screen turns off automatically
我在游戏中使用 Corona,但当我将 Android 智能手机内置时,出现屏幕无法保持亮起(进入休眠状态)的问题。我的问题是如何让屏幕保持与屏幕交互?
您可以使用system.setIdleTimer()
来控制空闲计时器。
Controls whether the idle timer is enabled. If set to true, the timer will be active (default) or inactive if false. When active, the idle timer dims the screen and eventually puts the device to sleep when no user activity occurs (e.g. screen touches).
示例:
system.setIdleTimer(false) -- Screen does not turn off automatically
system.setIdleTimer(true) -- Screen turns off automatically