class_lightoccluder2d.rst 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the LightOccluder2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_LightOccluder2D:
  6. LightOccluder2D
  7. ===============
  8. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Occludes light cast by a Light2D, casting shadows.
  13. Properties
  14. ----------
  15. +---------------------------------------------------+--------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`light_mask<class_LightOccluder2D_property_light_mask>` |
  17. +---------------------------------------------------+--------------------------------------------------------------+
  18. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`occluder<class_LightOccluder2D_property_occluder>` |
  19. +---------------------------------------------------+--------------------------------------------------------------+
  20. Description
  21. -----------
  22. Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` in order for the shadow to be computed.
  23. Tutorials
  24. ---------
  25. - :doc:`../tutorials/2d/2d_lights_and_shadows`
  26. Property Descriptions
  27. ---------------------
  28. .. _class_LightOccluder2D_property_light_mask:
  29. - :ref:`int<class_int>` **light_mask**
  30. +----------+--------------------------------+
  31. | *Setter* | set_occluder_light_mask(value) |
  32. +----------+--------------------------------+
  33. | *Getter* | get_occluder_light_mask() |
  34. +----------+--------------------------------+
  35. The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
  36. ----
  37. .. _class_LightOccluder2D_property_occluder:
  38. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **occluder**
  39. +----------+-----------------------------+
  40. | *Setter* | set_occluder_polygon(value) |
  41. +----------+-----------------------------+
  42. | *Getter* | get_occluder_polygon() |
  43. +----------+-----------------------------+
  44. The :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` used to compute the shadow.