blob: 2458b36ef6140e63042eae8b263baacc680ba104 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|