PointLight2D
Positional 2D light source.
Positional 2D light source.
Casts light in a 2D environment. This light's shape is defined by a (usually grayscale) texture.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PointLight2DConstructor
public PointLight2D();Properties4
HeightProperty
public float Height { get; set; }The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane.
OffsetProperty
public Vector2 Offset { get; set; }The offset of the light's PointLight2D.Texture.
TextureProperty
TextureScaleProperty
public float TextureScale { get; set; }The PointLight2D.Texture's scale factor.
Methods6
GetTextureTexture2D
public Texture2D GetTexture();Returns
Texture2DGetTextureOffsetVector2
public Vector2 GetTextureOffset();Returns
Vector2GetTextureScalefloat
public float GetTextureScale();Returns
floatSetTexturevoid
public void SetTexture(Texture2D texture);| Name | Type | Default |
|---|---|---|
texture | Texture2D | — |
SetTextureOffsetvoid
public void SetTextureOffset(Vector2 textureOffset);| Name | Type | Default |
|---|---|---|
textureOffset | Vector2 | — |
SetTextureScalevoid
public void SetTextureScale(float textureScale);| Name | Type | Default |
|---|---|---|
textureScale | float | — |
Reckfell Engine documentationBack to top ↑