LightOccluder2D.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="LightOccluder2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Occludes light cast by a Light2D, casting shadows.
  5. </brief_description>
  6. <description>
  7. Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_occluder_light_mask" qualifiers="const">
  15. <return type="int">
  16. </return>
  17. <description>
  18. Return the light mask of the LightOccluder2D.
  19. </description>
  20. </method>
  21. <method name="get_occluder_polygon" qualifiers="const">
  22. <return type="OccluderPolygon2D">
  23. </return>
  24. <description>
  25. Return the OccluderPolygon2D that defines the LightOccluder2D.
  26. </description>
  27. </method>
  28. <method name="set_occluder_light_mask">
  29. <return type="void">
  30. </return>
  31. <argument index="0" name="mask" type="int">
  32. </argument>
  33. <description>
  34. Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
  35. </description>
  36. </method>
  37. <method name="set_occluder_polygon">
  38. <return type="void">
  39. </return>
  40. <argument index="0" name="polygon" type="OccluderPolygon2D">
  41. </argument>
  42. <description>
  43. Set the OccluderPolygon2D that defines the LightOccluder2D.
  44. </description>
  45. </method>
  46. </methods>
  47. <members>
  48. <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask">
  49. The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
  50. </member>
  51. <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
  52. The [OccluderPolygon2D] used to compute the shadow.
  53. </member>
  54. </members>
  55. <constants>
  56. </constants>
  57. </class>