Files
godot-docs/classes/class_visibilitynotifier2d.rst
2017-06-17 14:07:36 +02:00

74 lines
2.7 KiB
ReStructuredText

.. 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_VisibilityNotifier2D:
VisibilityNotifier2D
====================
**Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
**Inherited By:** :ref:`VisibilityEnabler2D<class_visibilityenabler2d>`
**Category:** Core
Brief Description
-----------------
Detect when the node is visible on screen.
Member Functions
----------------
+----------------------------+---------------------------------------------------------------------------------------------------+
| :ref:`Rect2<class_rect2>` | :ref:`get_rect<class_VisibilityNotifier2D_get_rect>` **(** **)** const |
+----------------------------+---------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibilityNotifier2D_is_on_screen>` **(** **)** const |
+----------------------------+---------------------------------------------------------------------------------------------------+
| void | :ref:`set_rect<class_VisibilityNotifier2D_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
+----------------------------+---------------------------------------------------------------------------------------------------+
Signals
-------
- **enter_screen** **(** **)**
Emitted when the VisibilityNotifier2D enters the screen.
- **enter_viewport** **(** :ref:`Object<class_object>` viewport **)**
Emitted when the VisibilityNotifier2D enters a :ref:`Viewport<class_viewport>`.
- **exit_screen** **(** **)**
Emitted when the VisibilityNotifier2D exits the screen.
- **exit_viewport** **(** :ref:`Object<class_object>` viewport **)**
Emitted when the VisibilityNotifier2D exits a :ref:`Viewport<class_viewport>`.
Description
-----------
The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
Member Function Description
---------------------------
.. _class_VisibilityNotifier2D_get_rect:
- :ref:`Rect2<class_rect2>` **get_rect** **(** **)** const
Return the visibility bounding rectangle of the VisibilityNotifier2D.
.. _class_VisibilityNotifier2D_is_on_screen:
- :ref:`bool<class_bool>` **is_on_screen** **(** **)** const
Return true if any part of the bounding rectangle is on the screen.
.. _class_VisibilityNotifier2D_set_rect:
- void **set_rect** **(** :ref:`Rect2<class_rect2>` rect **)**
Set the visibility bounding rectangle of the VisibilityNotifier2D.