class_visualscriptinputaction.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/visual_script/doc_classes/VisualScriptInputAction.xml.
  6. .. _class_VisualScriptInputAction:
  7. VisualScriptInputAction
  8. =======================
  9. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A Visual Script node returning a state of an action.
  11. Description
  12. -----------
  13. ``VisualScriptInputAction`` can be used to check if an action is pressed or released.
  14. Properties
  15. ----------
  16. +------------------------------------------------+--------------------------------------------------------------+---------+
  17. | :ref:`StringName<class_StringName>` | :ref:`action<class_VisualScriptInputAction_property_action>` | ``&""`` |
  18. +------------------------------------------------+--------------------------------------------------------------+---------+
  19. | :ref:`Mode<enum_VisualScriptInputAction_Mode>` | :ref:`mode<class_VisualScriptInputAction_property_mode>` | ``0`` |
  20. +------------------------------------------------+--------------------------------------------------------------+---------+
  21. Enumerations
  22. ------------
  23. .. _enum_VisualScriptInputAction_Mode:
  24. .. _class_VisualScriptInputAction_constant_MODE_PRESSED:
  25. .. _class_VisualScriptInputAction_constant_MODE_RELEASED:
  26. .. _class_VisualScriptInputAction_constant_MODE_JUST_PRESSED:
  27. .. _class_VisualScriptInputAction_constant_MODE_JUST_RELEASED:
  28. enum **Mode**:
  29. - **MODE_PRESSED** = **0** --- ``True`` if action is pressed.
  30. - **MODE_RELEASED** = **1** --- ``True`` if action is released (i.e. not pressed).
  31. - **MODE_JUST_PRESSED** = **2** --- ``True`` on the frame the action was pressed.
  32. - **MODE_JUST_RELEASED** = **3** --- ``True`` on the frame the action was released.
  33. Property Descriptions
  34. ---------------------
  35. .. _class_VisualScriptInputAction_property_action:
  36. - :ref:`StringName<class_StringName>` **action**
  37. +-----------+------------------------+
  38. | *Default* | ``&""`` |
  39. +-----------+------------------------+
  40. | *Setter* | set_action_name(value) |
  41. +-----------+------------------------+
  42. | *Getter* | get_action_name() |
  43. +-----------+------------------------+
  44. Name of the action.
  45. ----
  46. .. _class_VisualScriptInputAction_property_mode:
  47. - :ref:`Mode<enum_VisualScriptInputAction_Mode>` **mode**
  48. +-----------+------------------------+
  49. | *Default* | ``0`` |
  50. +-----------+------------------------+
  51. | *Setter* | set_action_mode(value) |
  52. +-----------+------------------------+
  53. | *Getter* | get_action_mode() |
  54. +-----------+------------------------+
  55. State of the action to check. See :ref:`Mode<enum_VisualScriptInputAction_Mode>` for options.
  56. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  57. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  58. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  59. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  60. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  61. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`