Files
godot-docs/classes/class_visibilitynotifier2d.rst
2017-11-27 08:32:15 +01:00

79 lines
2.2 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the VisibilityNotifier2D.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _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
-----------------
Detects when the node is visible on screen.
Member Functions
----------------
+--------------------------+--------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibilityNotifier2D_is_on_screen>` **(** **)** const |
+--------------------------+--------------------------------------------------------------------------------+
Signals
-------
.. _class_VisibilityNotifier2D_screen_entered:
- **screen_entered** **(** **)**
Emitted when the VisibilityNotifier2D enters the screen.
.. _class_VisibilityNotifier2D_screen_exited:
- **screen_exited** **(** **)**
Emitted when the VisibilityNotifier2D exits the screen.
.. _class_VisibilityNotifier2D_viewport_entered:
- **viewport_entered** **(** :ref:`Object<class_object>` viewport **)**
Emitted when the VisibilityNotifier2D enters a :ref:`Viewport<class_viewport>`'s view.
.. _class_VisibilityNotifier2D_viewport_exited:
- **viewport_exited** **(** :ref:`Object<class_object>` viewport **)**
Emitted when the VisibilityNotifier2D exits a :ref:`Viewport<class_viewport>`'s view.
Member Variables
----------------
.. _class_VisibilityNotifier2D_rect:
- :ref:`Rect2<class_rect2>` **rect** - The VisibilityNotifier2D's bounding rectangle.
Description
-----------
The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
Member Function Description
---------------------------
.. _class_VisibilityNotifier2D_is_on_screen:
- :ref:`bool<class_bool>` **is_on_screen** **(** **)** const
If ``true`` the bounding rectangle is on the screen.