Class LightBehaviourComponent
A component which applies a specific behaviour to a PointLightComponent on its owner.
Implements
Namespace: Content.Client.Light.Components
Assembly: Content.Client.dll
Syntax
public sealed class LightBehaviourComponent : SharedLightBehaviourComponent, ISerializationHooks
Fields
| Improve this Doc View SourceAnimations
Declaration
public readonly List<LightBehaviourComponent.AnimationContainer> Animations
Field Value
Type | Description |
---|---|
List<LightBehaviourComponent.AnimationContainer> |
Behaviours
Declaration
public List<LightBehaviourAnimationTrack> Behaviours
Field Value
Type | Description |
---|---|
List<LightBehaviourAnimationTrack> |
Methods
| Improve this Doc View SourceAddNewLightBehaviour(LightBehaviourAnimationTrack, Boolean)
Add a new light behaviour to the component and start it immediately unless otherwise specified.
Declaration
public void AddNewLightBehaviour(LightBehaviourAnimationTrack behaviour, bool playImmediately = true)
Parameters
Type | Name | Description |
---|---|---|
LightBehaviourAnimationTrack | behaviour | |
System.Boolean | playImmediately |
HasRunningBehaviours()
Checks if at least one behaviour is running.
Declaration
public bool HasRunningBehaviours()
Returns
Type | Description |
---|---|
System.Boolean | Whether at least one behaviour is running, false if none is. |
StartLightBehaviour(String)
Start animating a light behaviour with the specified ID. If the specified ID is empty, it will start animating all light behaviour entries. If specified light behaviours are already animating, calling this does nothing. Multiple light behaviours can have the same ID.
Declaration
public void StartLightBehaviour(string id = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
StopLightBehaviour(String, Boolean, Boolean)
If any light behaviour with the specified ID is animating, then stop it. If no ID is specified then all light behaviours will be stopped. Multiple light behaviours can have the same ID.
Declaration
public void StopLightBehaviour(string id = "", bool removeBehaviour = false, bool resetToOriginalSettings = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | |
System.Boolean | removeBehaviour | Should the behaviour(s) also be removed permanently? |
System.Boolean | resetToOriginalSettings | Should the light have its original settings applied? |
Explicit Interface Implementations
| Improve this Doc View SourceISerializationHooks.AfterDeserialization()
Declaration
void ISerializationHooks.AfterDeserialization()