1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
- .. _class_VisibilityEnabler2D:
- VisibilityEnabler2D
- ===================
- **Inherits:** :ref:`VisibilityNotifier2D<class_visibilitynotifier2d>` **<** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Enable certain nodes only when visible.
- Member Functions
- ----------------
- +--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_enabler_enabled<class_VisibilityEnabler2D_is_enabler_enabled>` **(** :ref:`int<class_int>` enabler **)** const |
- +--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_enabler<class_VisibilityEnabler2D_set_enabler>` **(** :ref:`int<class_int>` enabler, :ref:`bool<class_bool>` enabled **)** |
- +--------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
- Numeric Constants
- -----------------
- - **ENABLER_FREEZE_BODIES** = **1** --- This enabler will freeze :ref:`RigidBody2D<class_rigidbody2d>` nodes.
- - **ENABLER_PAUSE_ANIMATIONS** = **0** --- This enabler will pause :ref:`AnimationPlayer<class_animationplayer>` nodes.
- - **ENABLER_PAUSE_PARTICLES** = **2** --- This enabler will stop :ref:`Particles2D<class_particles2d>` nodes.
- - **ENABLER_PAUSE_ANIMATED_SPRITES** = **5**
- - **ENABLER_PARENT_PROCESS** = **3** --- This enabler will stop the parent's _process function.
- - **ENABLER_PARENT_FIXED_PROCESS** = **4** --- This enabler will stop the parent's _fixed_process function.
- - **ENABLER_MAX** = **6**
- Description
- -----------
- The VisibilityEnabler2D will disable :ref:`RigidBody2D<class_rigidbody2d>`, :ref:`AnimationPlayer<class_animationplayer>`, and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.
- Member Function Description
- ---------------------------
- .. _class_VisibilityEnabler2D_is_enabler_enabled:
- - :ref:`bool<class_bool>` **is_enabler_enabled** **(** :ref:`int<class_int>` enabler **)** const
- Returns whether the specified enabler was set to true or not.
- .. _class_VisibilityEnabler2D_set_enabler:
- - void **set_enabler** **(** :ref:`int<class_int>` enabler, :ref:`bool<class_bool>` enabled **)**
- Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect.
|