2014-07-11 17:48:20 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Controller
|
|
|
|
-- @parent_module cc
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Activate receives key event from external key. e.g. back,menu.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- 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>
|
2015-03-19 11:55:42 +08:00
|
|
|
-- param externalKeyCode External key code.<br>
|
|
|
|
-- param receive True if external key event on this controller should be receive, false otherwise.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] receiveExternalKeyEvent
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int externalKeyCode
|
|
|
|
-- @param #bool receive
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Controller#Controller self (return value: cc.Controller)
|
2014-07-11 17:48:20 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets the name of this Controller object.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] getDeviceName
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Indicates whether the Controller is connected.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] isConnected
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets the Controller id.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] getDeviceId
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Changes the tag that is used to identify the controller easily.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- param tag A integer that identifies the controller.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] setTag
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int tag
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Controller#Controller self (return value: cc.Controller)
|
2014-07-11 17:48:20 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns a tag that is used to identify the controller easily.<br>
|
|
|
|
-- return An integer that identifies the controller.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] getTag
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Start discovering new controllers.<br>
|
|
|
|
-- warning The API only work on the IOS platform. Empty implementation on other platform.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] startDiscoveryController
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Controller#Controller self (return value: cc.Controller)
|
2014-07-11 17:48:20 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Stop the discovery process.<br>
|
|
|
|
-- warning The API only work on the IOS platform.Empty implementation on other platform.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] stopDiscoveryController
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Controller#Controller self (return value: cc.Controller)
|
2014-07-11 17:48:20 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Gets a Controller object with tag.<br>
|
|
|
|
-- param tag An identifier to find the controller.<br>
|
|
|
|
-- return A Controller object.
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @function [parent=#Controller] getControllerByTag
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int tag
|
2014-07-11 17:48:20 +08:00
|
|
|
-- @return Controller#Controller ret (return value: cc.Controller)
|
|
|
|
|
|
|
|
return nil
|