class_visualscriptinputaction.rst 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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:`Reference<class_Reference>` **<** :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:`String<class_String>` | :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:`String<class_String>` **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.)`