reckfellENGINE

PointLight2D

Positional 2D light source.

On this page
class PointLight2DReckfellSharpInherits Light2D

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
# PointLight2D
C#
public PointLight2D();

Properties4

HeightProperty
# Height
C#
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
# Offset
C#
public Vector2 Offset { get; set; }

The offset of the light's PointLight2D.Texture.

TextureProperty
# Texture
C#
public Texture2D Texture { get; set; }

Texture2D used for the light's appearance.

TextureScaleProperty
# TextureScale
C#
public float TextureScale { get; set; }

The PointLight2D.Texture's scale factor.

Methods6

GetTextureTexture2D
# GetTexture
C#
public Texture2D GetTexture();
Returns Texture2D
GetTextureOffsetVector2
# GetTextureOffset
C#
public Vector2 GetTextureOffset();
Returns Vector2
GetTextureScalefloat
# GetTextureScale
C#
public float GetTextureScale();
Returns float
SetTexturevoid
# SetTexture
C#
public void SetTexture(Texture2D texture);
Parameters
NameTypeDefault
textureTexture2D—
SetTextureOffsetvoid
# SetTextureOffset
C#
public void SetTextureOffset(Vector2 textureOffset);
Parameters
NameTypeDefault
textureOffsetVector2—
SetTextureScalevoid
# SetTextureScale
C#
public void SetTextureScale(float textureScale);
Parameters
NameTypeDefault
textureScalefloat—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.