Show / Hide Table of Contents

Class SearchLight

This function creates a searchlight. A searchlight is a spotlight which looks like the one available in the Police Maverick.

Inheritance
Object
Element
SearchLight
Inherited Members
Element.element
Element.Root
Element.MTAElement
Element.Type
Element.ID
Element.Exists
Element.ChildCount
Element.Parent
Element.CallPropagationEnabled
Element.SetData(String, Object, Boolean)
Element.GetData(String, Boolean)
Element.TryGetData(String, Object, Boolean)
Element.GetData<T>(String, Boolean)
Element.TryGetData<T>(String, T, Boolean)
Element.Destroy()
Element.GetChild(Int32)
Element.GetChildren(String)
Element.GetByID(String, Int32)
Element.ListenForEvent(String, Boolean, String)
Element.HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)
Element.OnDestroy
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client.Lights
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.SearchLight)]
public class SearchLight : Element

Constructors

| Improve this Doc View Source

SearchLight(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
| Improve this Doc View Source

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 Source

relativeEndPosition

Declaration
protected Vector3 relativeEndPosition
Field Value
Type Description
Vector3
| Improve this Doc View Source

toAttached

Declaration
protected PhysicalElement toAttached
Field Value
Type Description
PhysicalElement

Properties

| Improve this Doc View Source

EndPosition

Get and set the end position of this searchlight

Declaration
public Vector3 EndPosition { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

EndRadius

Gets and sets the end radius of a searchlight element.

Declaration
public float EndRadius { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

IsAttached

Get if this attachable is attached to a ToAttachable

Declaration
public bool IsAttached { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Offset

A matrix describing the offset with which this attachable is attached

Declaration
public Matrix4x4 Offset { get; set; }
Property Value
Type Description
Matrix4x4
| Improve this Doc View Source

StartPosition

Get and set the start position of this searchlight

Declaration
public Vector3 StartPosition { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

StartRadius

Gets and sets the start radius of a searchlight element.

Declaration
public float StartRadius { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

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 Source

AttachTo(PhysicalElement)

Attach this attachable to a toAttachable without any offset

Declaration
public void AttachTo(PhysicalElement toElement)
Parameters
Type Name Description
PhysicalElement toElement
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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
| Improve this Doc View Source

Detach()

Detach this attachable

Declaration
public void Detach()
| Improve this Doc View Source

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
  • Improve this Doc
  • View Source
Back to top Generated by DocFX