public class Controllers extends Object
Controller instances. Query the available controllers via getControllers(), add
and remove global ControllerListener instances via addListener(ControllerListener) and
removeListener(ControllerListener). The listeners will be invoked on the rendering thread. The global listeners will
be invoked for all events generated by all controllers. Polling a Controller can be done by invoking one of its getter methods.| Constructor and Description |
|---|
Controllers() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(ControllerListener listener)
Add a global
ControllerListener that can react to events from all Controller instances. |
static void |
clearListeners()
Removes every global
ControllerListener previously added. |
static Array<Controller> |
getControllers()
Returns an array of connected
Controller instances. |
static Array<ControllerListener> |
getListeners()
Returns all listeners currently registered.
|
static void |
removeListener(ControllerListener listener)
Removes a global
ControllerListener. |
public static Array<Controller> getControllers()
Controller instances. This method should only be called on the rendering thread.public static void addListener(ControllerListener listener)
ControllerListener that can react to events from all Controller instances. The listener will be
invoked on the rendering thread.listener - public static void removeListener(ControllerListener listener)
ControllerListener. The method must be called on the rendering thread.listener - public static void clearListeners()
ControllerListener previously added.public static Array<ControllerListener> getListeners()
Copyright © 2017. All rights reserved.