RPG_2D_CONTROLLERSο
This Singleton automatically creates a list off all connected controllers and automatically changes the light color of any newly connected controllers
Propertiesο
|
Methodsο
void |
_ready() |
void |
_joy_changed(device: int, connected: bool) |
void |
change_light(device: int, color: Color) |
_player_color(player_num: int) |
Property Descriptionsο
Array[Dictionary] Controllers = [...] π
List of connected controllers.
Note: Controller[0] is the default device (eg. KeyBoard/Mouse) and all others are gamepads.
The dicionary contains:
id: Device number (-1means default device)name: Device name as a stringhas_light: Boolean for whether or not the controller has a lightlight: The color of the light (0means there is no light, otherwise the value is of type Color
Method Descriptionsο
void _ready() π
There is currently no description for this method. Please help us by contributing one!
void _joy_changed(device: int, connected: bool) π
There is currently no description for this method. Please help us by contributing one!
void change_light(device: int, color: Color) π
Change a controllerβs light through here so that the Controllers array stays updated.
Color _player_color(player_num: int) π
There is currently no description for this method. Please help us by contributing one!