Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
InputMap¶
Inherits: Object
Singleton que gestiona InputEventAction.
Descripción¶
Gestiona todos los InputEventAction que pueden ser creados/modificados desde el menú de configuración del proyecto Proyecto > Configuración del proyecto > Mapa de entrada o en código con add_action y action_add_event. Ver Node._input.
Tutoriales¶
Métodos¶
void |
action_add_event ( String action, InputEvent event ) |
void |
action_erase_event ( String action, InputEvent event ) |
void |
action_erase_events ( String action ) |
action_get_deadzone ( String action ) |
|
action_has_event ( String action, InputEvent event ) |
|
void |
action_set_deadzone ( String action, float deadzone ) |
void |
add_action ( String action, float deadzone=0.5 ) |
void |
erase_action ( String action ) |
event_is_action ( InputEvent event, String action, bool exact_match=false ) const |
|
get_action_list ( String action ) |
|
get_actions ( ) |
|
has_action ( String action ) const |
|
void |
Descripciones de Métodos¶
void action_add_event ( String action, InputEvent event )
Añade un InputEvent a una acción. Este InputEvent desencadenará la acción.
void action_erase_event ( String action, InputEvent event )
Elimina un InputEvent de una acción.
void action_erase_events ( String action )
Elimina todos los eventos de una acción.
Returns a deadzone value for the action.
bool action_has_event ( String action, InputEvent event )
Devuelve true
si la acción tiene asociado el InputEvent dado.
Establece un valor de zona muerta para la acción.
Añade una acción vacía al InputMap
con una zona muerta ``configurable ``.
A continuación, se puede añadir un InputEvent a esta acción con el action_add_event.
void erase_action ( String action )
Elimina una acción del InputMap
.
bool event_is_action ( InputEvent event, String action, bool exact_match=false ) const
Returns true
if the given event is part of an existing action. This method ignores keyboard modifiers if the given InputEvent is not pressed (for proper release detection). See action_has_event if you don't want this behavior.
If exact_match
is false
, it ignores the input modifiers for InputEventKey and InputEventMouseButton events, and the direction for InputEventJoypadMotion events.
Devuelve un conjunto de InputEvents asociados a una acción determinada.
Array get_actions ( )
Devuelve un conjunto de todas las acciones en el InputMap
.
Devuelve true
si el InputMap
tiene una acción registrada con el nombre dado.
void load_from_globals ( )
Borra todo InputEventAction en el InputMap
y cárgalo de nuevo desde ProjectSettings.