Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

OccluderPolygon2D

Inherits: Resource < RefCounted < Object

为 LightOccluder2D 定义一个 2D 多边形。

Description

编辑工具,帮助你绘制一个 2D 多边形用作资源 LightOccluder2D

Properties

bool

closed

true

CullMode

cull_mode

0

PackedVector2Array

polygon

PackedVector2Array()


Enumerations

enum CullMode:

CullMode CULL_DISABLED = 0

禁用剔除。见 cull_mode

CullMode CULL_CLOCKWISE = 1

按顺时针方向进行剔除。见 cull_mode

CullMode CULL_COUNTER_CLOCKWISE = 2

按逆时针方向进行剔除。见 cull_mode


Property Descriptions

bool closed = true

  • void set_closed ( bool value )

  • bool is_closed ( )

如果为 true,封闭该多边形。一个封闭的polygon2d封闭来自任何方向的光。一个开放的OccluderPolygon2D只在其轮廓方向上遮挡光。


CullMode cull_mode = 0

要使用的剔除模式。


PackedVector2Array polygon = PackedVector2Array()

带有多边形顶点位置索引的 Vector2 数组。

注意:返回值是基础数组的副本,而不是引用。