class_visibilityenabler.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisibilityEnabler.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisibilityEnabler:
  6. VisibilityEnabler
  7. =================
  8. **Inherits:** :ref:`VisibilityNotifier<class_VisibilityNotifier>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Enables certain nodes only when visible.
  13. Properties
  14. ----------
  15. +-------------------------+----------------------------------------------------------------------------+------+
  16. | :ref:`bool<class_bool>` | :ref:`freeze_bodies<class_VisibilityEnabler_property_freeze_bodies>` | true |
  17. +-------------------------+----------------------------------------------------------------------------+------+
  18. | :ref:`bool<class_bool>` | :ref:`pause_animations<class_VisibilityEnabler_property_pause_animations>` | true |
  19. +-------------------------+----------------------------------------------------------------------------+------+
  20. Methods
  21. -------
  22. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`is_enabler_enabled<class_VisibilityEnabler_method_is_enabler_enabled>` **(** :ref:`Enabler<enum_VisibilityEnabler_Enabler>` enabler **)** const |
  24. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_enabler<class_VisibilityEnabler_method_set_enabler>` **(** :ref:`Enabler<enum_VisibilityEnabler_Enabler>` enabler, :ref:`bool<class_bool>` enabled **)** |
  26. +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. Enumerations
  28. ------------
  29. .. _enum_VisibilityEnabler_Enabler:
  30. .. _class_VisibilityEnabler_constant_ENABLER_PAUSE_ANIMATIONS:
  31. .. _class_VisibilityEnabler_constant_ENABLER_FREEZE_BODIES:
  32. .. _class_VisibilityEnabler_constant_ENABLER_MAX:
  33. enum **Enabler**:
  34. - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer<class_AnimationPlayer>` nodes.
  35. - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody<class_RigidBody>` nodes.
  36. - **ENABLER_MAX** = **2** --- Represents the size of the :ref:`Enabler<enum_VisibilityEnabler_Enabler>` enum.
  37. Description
  38. -----------
  39. The VisibilityEnabler will disable :ref:`RigidBody<class_RigidBody>` and :ref:`AnimationPlayer<class_AnimationPlayer>` nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
  40. Property Descriptions
  41. ---------------------
  42. .. _class_VisibilityEnabler_property_freeze_bodies:
  43. - :ref:`bool<class_bool>` **freeze_bodies**
  44. +-----------+----------------------+
  45. | *Default* | true |
  46. +-----------+----------------------+
  47. | *Setter* | set_enabler(value) |
  48. +-----------+----------------------+
  49. | *Getter* | is_enabler_enabled() |
  50. +-----------+----------------------+
  51. If ``true``, :ref:`RigidBody<class_RigidBody>` nodes will be paused.
  52. .. _class_VisibilityEnabler_property_pause_animations:
  53. - :ref:`bool<class_bool>` **pause_animations**
  54. +-----------+----------------------+
  55. | *Default* | true |
  56. +-----------+----------------------+
  57. | *Setter* | set_enabler(value) |
  58. +-----------+----------------------+
  59. | *Getter* | is_enabler_enabled() |
  60. +-----------+----------------------+
  61. If ``true``, :ref:`AnimationPlayer<class_AnimationPlayer>` nodes will be paused.
  62. Method Descriptions
  63. -------------------
  64. .. _class_VisibilityEnabler_method_is_enabler_enabled:
  65. - :ref:`bool<class_bool>` **is_enabler_enabled** **(** :ref:`Enabler<enum_VisibilityEnabler_Enabler>` enabler **)** const
  66. .. _class_VisibilityEnabler_method_set_enabler:
  67. - void **set_enabler** **(** :ref:`Enabler<enum_VisibilityEnabler_Enabler>` enabler, :ref:`bool<class_bool>` enabled **)**