Skip to content
0.2.0-dev Download ZIP
33 lines ·1.6 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="OccluderPolygon2D" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Defines a 2D polygon for LightOccluder2D.
5 </brief_description>
6 <description>
7 Editor facility that helps you draw a 2D polygon used as resource for [LightOccluder2D].
8 </description>
9 <tutorials>
10 </tutorials>
11 <members>
12 <member name="closed" type="bool" setter="set_closed" getter="is_closed" default="true">
13 If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction.
14 </member>
15 <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0">
16 The culling mode to use.
17 </member>
18 <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
19 A [Vector2] array with the index for polygon's vertices positions.
20 </member>
21 </members>
22 <constants>
23 <constant name="CULL_DISABLED" value="0" enum="CullMode">
24 Culling is disabled. See [member cull_mode].
25 </constant>
26 <constant name="CULL_CLOCKWISE" value="1" enum="CullMode">
27 Culling is performed in the clockwise direction. See [member cull_mode].
28 </constant>
29 <constant name="CULL_COUNTER_CLOCKWISE" value="2" enum="CullMode">
30 Culling is performed in the counterclockwise direction. See [member cull_mode].
31 </constant>
32 </constants>
33</class>