class_visibilitynotifier2d.rst 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the VisibilityNotifier2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_VisibilityNotifier2D:
  5. VisibilityNotifier2D
  6. ====================
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Inherited By:** :ref:`VisibilityEnabler2D<class_visibilityenabler2d>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Detects when the node is visible on screen.
  13. Member Functions
  14. ----------------
  15. +----------------------------+---------------------------------------------------------------------------------------------------+
  16. | :ref:`Rect2<class_rect2>` | :ref:`get_rect<class_VisibilityNotifier2D_get_rect>` **(** **)** const |
  17. +----------------------------+---------------------------------------------------------------------------------------------------+
  18. | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibilityNotifier2D_is_on_screen>` **(** **)** const |
  19. +----------------------------+---------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_rect<class_VisibilityNotifier2D_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
  21. +----------------------------+---------------------------------------------------------------------------------------------------+
  22. Signals
  23. -------
  24. - **screen_entered** **(** **)**
  25. Emitted when the VisibilityNotifier2D enters the screen.
  26. - **screen_exited** **(** **)**
  27. Emitted when the VisibilityNotifier2D exits the screen.
  28. - **viewport_entered** **(** :ref:`Object<class_object>` viewport **)**
  29. Emitted when the VisibilityNotifier2D enters a :ref:`Viewport<class_viewport>`'s view.
  30. - **viewport_exited** **(** :ref:`Object<class_object>` viewport **)**
  31. Emitted when the VisibilityNotifier2D exits a :ref:`Viewport<class_viewport>`'s view.
  32. Member Variables
  33. ----------------
  34. - :ref:`Rect2<class_rect2>` **rect** - The VisibilityNotifier2D's bounding rectangle.
  35. Description
  36. -----------
  37. 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.
  38. Member Function Description
  39. ---------------------------
  40. .. _class_VisibilityNotifier2D_get_rect:
  41. - :ref:`Rect2<class_rect2>` **get_rect** **(** **)** const
  42. Returns the bounding rectangle of the VisibilityNotifier2D.
  43. .. _class_VisibilityNotifier2D_is_on_screen:
  44. - :ref:`bool<class_bool>` **is_on_screen** **(** **)** const
  45. If ``true`` the bounding rectangle is on the screen.
  46. .. _class_VisibilityNotifier2D_set_rect:
  47. - void **set_rect** **(** :ref:`Rect2<class_rect2>` rect **)**
  48. Set the visibility bounding rectangle of the VisibilityNotifier2D.