Class Light
A wrapper class for AdminToys.LightSourceToy.
public class Light : AdminToy, IWorldSpace, IPosition, IRotation, IWrapper<LightSourceToy>
- Inheritance
-
Light
- Implements
-
IWrapper<LightSourceToy>
- Inherited Members
- Extension Methods
Properties
Base
Gets the base AdminToys.LightSourceToy.
public LightSourceToy Base { get; }
Property Value
- LightSourceToy
Color
Gets or sets the color of the primitive.
public Color Color { get; set; }
Property Value
- Color
InnerSpotAngle
Gets or sets the inner angle of the light.
public float InnerSpotAngle { get; set; }
Property Value
Intensity
Gets or sets the intensity of the light.
public float Intensity { get; set; }
Property Value
LightShape
Gets or sets the shape that the Light emits.
[Obsolete("This property has been deprecated. Use LightType.Spot, LightType.Pyramid, or LightType.Box instead.")]
public LightShape LightShape { get; set; }
Property Value
- LightShape
LightType
Gets or sets the type of light the Light emits.
public LightType LightType { get; set; }
Property Value
- LightType
Prefab
Gets the prefab.
public static LightSourceToy Prefab { get; }
Property Value
- LightSourceToy
Range
Gets or sets the range of the light.
public float Range { get; set; }
Property Value
ShadowStrength
Gets or sets the shadow strength of the light.
public float ShadowStrength { get; set; }
Property Value
ShadowType
Gets or sets the type of shadows the light casts.
public LightShadows ShadowType { get; set; }
Property Value
- LightShadows
SpotAngle
Gets or sets the angle of the light.
public float SpotAngle { get; set; }
Property Value
Methods
Create(Vector3?, Vector3?, Vector3?, bool)
Creates a new Light.
public static Light Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true)
Parameters
positionVector3?The position of the Light.
rotationVector3?The rotation of the Light.
scaleVector3?The scale of the Light.
spawnboolWhether the Light should be initially spawned.
Returns
Create(Vector3?, Vector3?, Vector3?, bool, Color?)
Creates a new Light.
public static Light Create(Vector3? position, Vector3? rotation, Vector3? scale, bool spawn, Color? color)
Parameters
positionVector3?The position of the Light.
rotationVector3?The rotation of the Light.
scaleVector3?The scale of the Light.
spawnboolWhether the Light should be initially spawned.
colorColor?The color of the Light.
Returns
Get(LightSourceToy)
Gets the Light belonging to the AdminToys.LightSourceToy.
public static Light Get(LightSourceToy lightSourceToy)
Parameters
lightSourceToyLightSourceToyThe AdminToys.LightSourceToy instance.
Returns
- Light
The corresponding AdminToys.LightSourceToy instance.