class_visibilitynotifier2d.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_VisibilityNotifier2D:
  4. VisibilityNotifier2D
  5. ====================
  6. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Inherited By:** :ref:`VisibilityEnabler2D<class_visibilityenabler2d>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Detect when the node is visible on screen.
  12. Member Functions
  13. ----------------
  14. +----------------------------+---------------------------------------------------------------------------------------------------+
  15. | :ref:`Rect2<class_rect2>` | :ref:`get_rect<class_VisibilityNotifier2D_get_rect>` **(** **)** const |
  16. +----------------------------+---------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibilityNotifier2D_is_on_screen>` **(** **)** const |
  18. +----------------------------+---------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_rect<class_VisibilityNotifier2D_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
  20. +----------------------------+---------------------------------------------------------------------------------------------------+
  21. Signals
  22. -------
  23. - **enter_screen** **(** **)**
  24. Emitted when the VisibilityNotifier2D enters the screen.
  25. - **enter_viewport** **(** :ref:`Object<class_object>` viewport **)**
  26. Emitted when the VisibilityNotifier2D enters a :ref:`Viewport<class_viewport>`.
  27. - **exit_screen** **(** **)**
  28. Emitted when the VisibilityNotifier2D exits the screen.
  29. - **exit_viewport** **(** :ref:`Object<class_object>` viewport **)**
  30. Emitted when the VisibilityNotifier2D exits a :ref:`Viewport<class_viewport>`.
  31. Description
  32. -----------
  33. The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
  34. Member Function Description
  35. ---------------------------
  36. .. _class_VisibilityNotifier2D_get_rect:
  37. - :ref:`Rect2<class_rect2>` **get_rect** **(** **)** const
  38. Return the visibility bounding rectangle of the VisibilityNotifier2D.
  39. .. _class_VisibilityNotifier2D_is_on_screen:
  40. - :ref:`bool<class_bool>` **is_on_screen** **(** **)** const
  41. Return true if any part of the bounding rectangle is on the screen.
  42. .. _class_VisibilityNotifier2D_set_rect:
  43. - void **set_rect** **(** :ref:`Rect2<class_rect2>` rect **)**
  44. Set the visibility bounding rectangle of the VisibilityNotifier2D.