CharacterController
A Template Class for low-level & Controller-Specific input handling to control a character.
All methods are intended to be overwritten in a child class with your own custom settings.
Properties
|
||
|
||
|
||
|
Methods
void |
_ready() |
void |
_unhandled_input(event: InputEvent) |
void |
|
void |
|
void |
|
void |
_gamepad_input(event: InputEvent) |
void |
_default_input(event: InputEvent) |
void |
_poll_gamepad_input(_delta: float) |
void |
_poll_default_input(_delta: float) |
Constants
DEFAULT_DEVICE = -1 🔗
A Constant representing the id of the default device
Property Descriptions
Entity Character = get_parent() 🔗
The Character to be controlled
SmoothCamera CAM = <unknown> 🔗
Visuals
AudioListener2D EAR = <unknown> 🔗
Audio
The Controller from which input will be accepted
All other input devices will be ignored
Method Descriptions
void _ready() 🔗
There is currently no description for this method. Please help us by contributing one!
void _unhandled_input(event: InputEvent) 🔗
There is currently no description for this method. Please help us by contributing one!
There is currently no description for this method. Please help us by contributing one!
void prepare_audio_and_video() 🔗
A function to set up an AudioListener2D & Camera
void set_controller() 🔗
A Function to select which controller will be used
Use the RPG_2D_CONTROLLERS singleton to get all connected controllers
void _gamepad_input(event: InputEvent) 🔗
A Function to handle Input Events triggered by a gamepad
This function is only called if the event was triggered by the selected controller
void _default_input(event: InputEvent) 🔗
A Function to handle Input Events triggered by the default device (e.g: KeyBoard)
This function is only called if the event was triggered by the selected controller
void _poll_gamepad_input(_delta: float) 🔗
A Function to handle inputs from a gamepad continously instead of triggers
This function is only called if the selected controller is not the default device
Input is not filltered to the selected controller automatically
void _poll_default_input(_delta: float) 🔗
A Function to handle inputs from the default continously instead of triggers
This function is only called if the selected controller is the default device