diff options
Diffstat (limited to 'meta/3rd/Cocos4.0/library/cc.Device.lua')
-rw-r--r-- | meta/3rd/Cocos4.0/library/cc.Device.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/3rd/Cocos4.0/library/cc.Device.lua b/meta/3rd/Cocos4.0/library/cc.Device.lua new file mode 100644 index 00000000..2458b36e --- /dev/null +++ b/meta/3rd/Cocos4.0/library/cc.Device.lua @@ -0,0 +1,34 @@ +---@meta + +---@class cc.Device +local Device={ } +cc.Device=Device + + + + +---* To enable or disable accelerometer. +---@param isEnabled boolean +---@return self +function Device:setAccelerometerEnabled (isEnabled) end +---* Sets the interval of accelerometer. +---@param interval float +---@return self +function Device:setAccelerometerInterval (interval) end +---* Controls whether the screen should remain on.<br> +---* param keepScreenOn One flag indicating that the screen should remain on. +---@param keepScreenOn boolean +---@return self +function Device:setKeepScreenOn (keepScreenOn) end +---* Vibrate for the specified amount of time.<br> +---* If vibrate is not supported, then invoking this method has no effect.<br> +---* Some platforms limit to a maximum duration of 5 seconds.<br> +---* Duration is ignored on iOS due to API limitations.<br> +---* param duration The duration in seconds. +---@param duration float +---@return self +function Device:vibrate (duration) end +---* Gets the DPI of device<br> +---* return The DPI of device. +---@return int +function Device:getDPI () end
\ No newline at end of file |