Class SearchLight
This function creates a searchlight. A searchlight is a spotlight which looks like the one available in the Police Maverick.
Inherited Members
Namespace: Slipe.Client.Lights
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.SearchLight)]
public class SearchLight : Element
Constructors
| Improve this Doc View SourceSearchLight(PhysicalElement, Vector3, Matrix4x4, Single, Single, Boolean)
Create a searchlight attached to an element
Declaration
public SearchLight(PhysicalElement attachTo, Vector3 relativeEnd, Matrix4x4 offset, float startRadius, float endRadius, bool renderSpot = true)
Parameters
Type | Name | Description |
---|---|---|
PhysicalElement | attachTo | |
Vector3 | relativeEnd | |
Matrix4x4 | offset | |
Single | startRadius | |
Single | endRadius | |
Boolean | renderSpot |
SearchLight(Vector3, Vector3, Single, Single, Boolean)
Create a searchlight from all parameters
Declaration
public SearchLight(Vector3 start, Vector3 end, float startRadius, float endRadius, bool renderSpot = true)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | start | |
Vector3 | end | |
Single | startRadius | |
Single | endRadius | |
Boolean | renderSpot |
Fields
| Improve this Doc View SourcerelativeEndPosition
Declaration
protected Vector3 relativeEndPosition
Field Value
Type | Description |
---|---|
Vector3 |
toAttached
Declaration
protected PhysicalElement toAttached
Field Value
Type | Description |
---|---|
PhysicalElement |
Properties
| Improve this Doc View SourceEndPosition
Get and set the end position of this searchlight
Declaration
public Vector3 EndPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
EndRadius
Gets and sets the end radius of a searchlight element.
Declaration
public float EndRadius { get; set; }
Property Value
Type | Description |
---|---|
Single |
IsAttached
Get if this attachable is attached to a ToAttachable
Declaration
public bool IsAttached { get; }
Property Value
Type | Description |
---|---|
Boolean |
Offset
A matrix describing the offset with which this attachable is attached
Declaration
public Matrix4x4 Offset { get; set; }
Property Value
Type | Description |
---|---|
Matrix4x4 |
StartPosition
Get and set the start position of this searchlight
Declaration
public Vector3 StartPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
StartRadius
Gets and sets the start radius of a searchlight element.
Declaration
public float StartRadius { get; set; }
Property Value
Type | Description |
---|---|
Single |
ToAttached
Get the physical element to which this attachable is attached
Declaration
public PhysicalElement ToAttached { get; }
Property Value
Type | Description |
---|---|
PhysicalElement |
Methods
| Improve this Doc View SourceAttachTo(PhysicalElement)
Attach this attachable to a toAttachable without any offset
Declaration
public void AttachTo(PhysicalElement toElement)
Parameters
Type | Name | Description |
---|---|---|
PhysicalElement | toElement |
AttachTo(PhysicalElement, Matrix4x4)
Attach this attachable to a toAttachable using a matrix to describe the positional and rotational offset
Declaration
public void AttachTo(PhysicalElement toElement, Matrix4x4 offsetMatrix)
Parameters
Type | Name | Description |
---|---|---|
PhysicalElement | toElement | |
Matrix4x4 | offsetMatrix |
AttachTo(PhysicalElement, Vector3, Quaternion)
Attach this attachable to a toAttachable with a vector describing the position offset and a quaternion describing the rotation offset
Declaration
public void AttachTo(PhysicalElement toElement, Vector3 positionOffset, Quaternion rotationOffset)
Parameters
Type | Name | Description |
---|---|---|
PhysicalElement | toElement | |
Vector3 | positionOffset | |
Quaternion | rotationOffset |
AttachTo(PhysicalElement, Vector3, Vector3)
Attach this attachable to a toAttachable with 2 vectors describing a position offset and a rotation offset
Declaration
public void AttachTo(PhysicalElement toElement, Vector3 positionOffset, Vector3 rotationOffset)
Parameters
Type | Name | Description |
---|---|---|
PhysicalElement | toElement | |
Vector3 | positionOffset | |
Vector3 | rotationOffset |
Detach()
Detach this attachable
Declaration
public void Detach()
Update(RootElement, OnUpdateEventArgs)
Updates this element to the correct position and rotation
Declaration
protected void Update(RootElement source, OnUpdateEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
RootElement | source | |
OnUpdateEventArgs | eventArgs |