summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/library/cc.Controller.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-05 20:51:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-05 20:51:43 +0800
commit8fefb8f3e100976235dc83d6ae3785952d11c710 (patch)
tree459117e6cecc70824273c4d32285cb6eec468098 /meta/3rd/Cocos4.0/library/cc.Controller.lua
parentb6c18d05410fd4ca209f9c34e0992caf40cf3701 (diff)
downloadlua-language-server-8fefb8f3e100976235dc83d6ae3785952d11c710.zip
cleanup
Diffstat (limited to 'meta/3rd/Cocos4.0/library/cc.Controller.lua')
-rw-r--r--meta/3rd/Cocos4.0/library/cc.Controller.lua56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/3rd/Cocos4.0/library/cc.Controller.lua b/meta/3rd/Cocos4.0/library/cc.Controller.lua
new file mode 100644
index 00000000..6ed4b19c
--- /dev/null
+++ b/meta/3rd/Cocos4.0/library/cc.Controller.lua
@@ -0,0 +1,56 @@
+---@meta
+
+---@class cc.Controller
+local Controller={ }
+cc.Controller=Controller
+
+
+
+
+---* Activate receives key event from external key. e.g. back,menu.<br>
+---* Controller receives only standard key which contained within enum Key by default.<br>
+---* warning The API only work on the android platform for support diversified game controller.<br>
+---* param externalKeyCode External key code.<br>
+---* param receive True if external key event on this controller should be receive, false otherwise.
+---@param externalKeyCode int
+---@param receive boolean
+---@return self
+function Controller:receiveExternalKeyEvent (externalKeyCode,receive) end
+---* Gets the name of this Controller object.
+---@return string
+function Controller:getDeviceName () end
+---* Indicates whether the Controller is connected.
+---@return boolean
+function Controller:isConnected () end
+---* Gets the Controller id.
+---@return int
+function Controller:getDeviceId () end
+---* Changes the tag that is used to identify the controller easily.<br>
+---* param tag A integer that identifies the controller.
+---@param tag int
+---@return self
+function Controller:setTag (tag) end
+---* Returns a tag that is used to identify the controller easily.<br>
+---* return An integer that identifies the controller.
+---@return int
+function Controller:getTag () end
+---* Start discovering new controllers.<br>
+---* warning The API has an empty implementation on Android.
+---@return self
+function Controller:startDiscoveryController () end
+---* Stop the discovery process.<br>
+---* warning The API has an empty implementation on Android.
+---@return self
+function Controller:stopDiscoveryController () end
+---* Gets a Controller object with device ID.<br>
+---* param deviceId A unique identifier to find the controller.<br>
+---* return A Controller object.
+---@param deviceId int
+---@return self
+function Controller:getControllerByDeviceId (deviceId) end
+---* Gets a Controller object with tag.<br>
+---* param tag An identifier to find the controller.<br>
+---* return A Controller object.
+---@param tag int
+---@return self
+function Controller:getControllerByTag (tag) end \ No newline at end of file