Difference between revisions of "Controller"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2014.01<br/> === Description === Controller interface allows you to use most popular controllers on a...")
 
Line 7: Line 7:
 
Internally Controller Interface also matches all buttons and controller behavior under the same scheme so you won't have to worry about that anymore.
 
Internally Controller Interface also matches all buttons and controller behavior under the same scheme so you won't have to worry about that anymore.
  
For more information check out [http://docs.giderosmobile.com/interface/controller](Controller Interface Guide){|-
+
For more information check out [http://docs.giderosmobile.com/interface/controller](Controller Interface Guide)
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
{|-
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Methods ===
 
=== Methods ===
 +
[[Controller:getControllerName]] - gets the name of controller<br/>
 +
[[Controller:getPlayerCount]] - returns amount of connected controllers<br/>
 +
[[Controller:getPlayers]] - returns table with controller IDs<br/>
 +
[[Controller:isAnyAvailable]] - return true if any controller is connected<br/>
 +
[[Controller:vibrate]] - vibrate the controller for provided amount of miliseconds<br/>
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Events ===
 
=== Events ===
 +
[[Event.CONNECTED]]
 +
[[Event.DISCONNECTED]]
 +
[[Event.KEY_DOWN]]
 +
[[Event.KEY_UP]]
 +
[[Event.LEFT_JOYSTICK]]
 +
[[Event.LEFT_TRIGGER]]
 +
[[Event.RIGHT_JOYSTICK]]
 +
[[Event.RIGHT_TRIGGER]]
 
=== Constants ===
 
=== Constants ===
 
|}
 
|}

Revision as of 08:57, 23 August 2018

Supported platforms:
Available since: Gideros 2014.01

Description

Controller interface allows you to use most popular controllers on all supported operating systems under the same interface.

Internally Controller Interface also matches all buttons and controller behavior under the same scheme so you won't have to worry about that anymore.

For more information check out [1](Controller Interface Guide)








Methods

Controller:getControllerName - gets the name of controller
Controller:getPlayerCount - returns amount of connected controllers
Controller:getPlayers - returns table with controller IDs
Controller:isAnyAvailable - return true if any controller is connected
Controller:vibrate - vibrate the controller for provided amount of miliseconds

Events

Event.CONNECTED Event.DISCONNECTED Event.KEY_DOWN Event.KEY_UP Event.LEFT_JOYSTICK Event.LEFT_TRIGGER Event.RIGHT_JOYSTICK Event.RIGHT_TRIGGER

Constants