class_visibilitynotifier2d.rst 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. Properties
  14. ----------
  15. +---------------------------+-------------------------------------------------------+
  16. | :ref:`Rect2<class_Rect2>` | :ref:`rect<class_VisibilityNotifier2D_property_rect>` |
  17. +---------------------------+-------------------------------------------------------+
  18. Methods
  19. -------
  20. +-------------------------+---------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibilityNotifier2D_method_is_on_screen>` **(** **)** const |
  22. +-------------------------+---------------------------------------------------------------------------------------+
  23. Signals
  24. -------
  25. .. _class_VisibilityNotifier2D_signal_screen_entered:
  26. - **screen_entered** **(** **)**
  27. Emitted when the VisibilityNotifier2D enters the screen.
  28. .. _class_VisibilityNotifier2D_signal_screen_exited:
  29. - **screen_exited** **(** **)**
  30. Emitted when the VisibilityNotifier2D exits the screen.
  31. .. _class_VisibilityNotifier2D_signal_viewport_entered:
  32. - **viewport_entered** **(** :ref:`Viewport<class_Viewport>` viewport **)**
  33. Emitted when the VisibilityNotifier2D enters a :ref:`Viewport<class_Viewport>`'s view.
  34. .. _class_VisibilityNotifier2D_signal_viewport_exited:
  35. - **viewport_exited** **(** :ref:`Viewport<class_Viewport>` viewport **)**
  36. Emitted when the VisibilityNotifier2D exits a :ref:`Viewport<class_Viewport>`'s view.
  37. Description
  38. -----------
  39. 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.
  40. Property Descriptions
  41. ---------------------
  42. .. _class_VisibilityNotifier2D_property_rect:
  43. - :ref:`Rect2<class_Rect2>` **rect**
  44. +----------+-----------------+
  45. | *Setter* | set_rect(value) |
  46. +----------+-----------------+
  47. | *Getter* | get_rect() |
  48. +----------+-----------------+
  49. The VisibilityNotifier2D's bounding rectangle.
  50. Method Descriptions
  51. -------------------
  52. .. _class_VisibilityNotifier2D_method_is_on_screen:
  53. - :ref:`bool<class_bool>` **is_on_screen** **(** **)** const
  54. If ``true``, the bounding rectangle is on the screen.