class_visualscriptinputaction.rst 3.5 KB

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