class_visibilityenabler.rst 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the VisibilityEnabler.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_VisibilityEnabler:
  5. VisibilityEnabler
  6. =================
  7. **Inherits:** :ref:`VisibilityNotifier<class_VisibilityNotifier>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Enable certain nodes only when visible.
  12. Properties
  13. ----------
  14. +-------------------------+----------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`freeze_bodies<class_VisibilityEnabler_property_freeze_bodies>` |
  16. +-------------------------+----------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`pause_animations<class_VisibilityEnabler_property_pause_animations>` |
  18. +-------------------------+----------------------------------------------------------------------------+
  19. Enumerations
  20. ------------
  21. .. _enum_VisibilityEnabler_Enabler:
  22. .. _class_VisibilityEnabler_constant_ENABLER_PAUSE_ANIMATIONS:
  23. .. _class_VisibilityEnabler_constant_ENABLER_FREEZE_BODIES:
  24. .. _class_VisibilityEnabler_constant_ENABLER_MAX:
  25. enum **Enabler**:
  26. - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer<class_AnimationPlayer>` nodes.
  27. - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody<class_RigidBody>` nodes.
  28. - **ENABLER_MAX** = **2**
  29. Description
  30. -----------
  31. 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.
  32. Property Descriptions
  33. ---------------------
  34. .. _class_VisibilityEnabler_property_freeze_bodies:
  35. - :ref:`bool<class_bool>` **freeze_bodies**
  36. +----------+----------------------+
  37. | *Setter* | set_enabler(value) |
  38. +----------+----------------------+
  39. | *Getter* | is_enabler_enabled() |
  40. +----------+----------------------+
  41. If ``true``, :ref:`RigidBody<class_RigidBody>` nodes will be paused.
  42. .. _class_VisibilityEnabler_property_pause_animations:
  43. - :ref:`bool<class_bool>` **pause_animations**
  44. +----------+----------------------+
  45. | *Setter* | set_enabler(value) |
  46. +----------+----------------------+
  47. | *Getter* | is_enabler_enabled() |
  48. +----------+----------------------+
  49. If ``true``, :ref:`AnimationPlayer<class_AnimationPlayer>` nodes will be paused.