class_lightoccluder2d.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/LightOccluder2D.xml.
  6. .. _class_LightOccluder2D:
  7. LightOccluder2D
  8. ===============
  9. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Occludes light cast by a Light2D, casting shadows.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`../tutorials/2d/2d_lights_and_shadows`
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +---------------------------------------------------+--------------------------------------------------------------+-------+
  25. | :ref:`int<class_int>` | :ref:`light_mask<class_LightOccluder2D_property_light_mask>` | ``1`` |
  26. +---------------------------------------------------+--------------------------------------------------------------+-------+
  27. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`occluder<class_LightOccluder2D_property_occluder>` | |
  28. +---------------------------------------------------+--------------------------------------------------------------+-------+
  29. .. rst-class:: classref-section-separator
  30. ----
  31. .. rst-class:: classref-descriptions-group
  32. Property Descriptions
  33. ---------------------
  34. .. _class_LightOccluder2D_property_light_mask:
  35. .. rst-class:: classref-property
  36. :ref:`int<class_int>` **light_mask** = ``1``
  37. .. rst-class:: classref-property-setget
  38. - void **set_occluder_light_mask** **(** :ref:`int<class_int>` value **)**
  39. - :ref:`int<class_int>` **get_occluder_light_mask** **(** **)**
  40. The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
  41. .. rst-class:: classref-item-separator
  42. ----
  43. .. _class_LightOccluder2D_property_occluder:
  44. .. rst-class:: classref-property
  45. :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **occluder**
  46. .. rst-class:: classref-property-setget
  47. - void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` value **)**
  48. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder_polygon** **(** **)**
  49. The :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` used to compute the shadow.
  50. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  51. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  52. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  53. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`