Click or drag to resize

LightningBoltParameters Class

Parameters that control lightning bolt behavior
Inheritance Hierarchy
SystemObject
  DigitalRuby.ThunderAndLightningLightningBoltParameters

Namespace:  DigitalRuby.ThunderAndLightning
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
[SerializableAttribute]
public sealed class LightningBoltParameters

The LightningBoltParameters type exposes the following members.

Constructors
  NameDescription
Public methodLightningBoltParameters
Constructor
Top
Properties
  NameDescription
Public propertyGenerations
Number of generations (0 for just a point light, otherwise 1 - 8). Higher generations have lightning with finer detail but more expensive to create.
Public propertyGrowthMultiplier
A value between 0 and 0.999 that determines how fast the lightning should grow over the lifetime. A value of 1 grows slowest, 0 grows instantly
Public propertyPoints
Points for the trunk to follow - not all generators support this
Public propertyRandom
Used to generate random numbers. Not thread safe.
Public propertyRandomOverride
Override Random to a different Random. This gets set back to null when the parameters go back to the cache. Great for a one time bolt that looks a certain way.
Top
Methods
  NameDescription
Public methodApplyVariance
Apply variance to a vector
Public methodEquals (Inherited from Object.)
Public methodForkMultiplier
Get a multiplier for fork distance
Public methodGetHashCode (Inherited from Object.)
Public methodStatic memberGetOrCreateParameters
Get or create lightning bolt parameters. If cache has parameters, one is taken, otherwise a new object is created. NOT thread safe.
Public methodGetType (Inherited from Object.)
Public methodReset
Reset parameters
Public methodStatic memberReturnParametersToCache
Return parameters to cache. NOT thread safe.
Public methodToString (Inherited from Object.)
Top
Fields
  NameDescription
Public fieldChaosFactor
How chaotic is the main trunk of lightning? (0 - 1). Higher numbers create more chaotic lightning.
Public fieldChaosFactorForks
How chaotic are the forks of the lightning? (0 - 1). Higher numbers create more chaotic lightning.
Public fieldColor
Tint color for the lightning, this is applied to both the lightning and the glow. Unlike the script properties for coloring which are applied per material, this is applied at the mesh level and as such different bolts on the same script can use different color values.
Public fieldCustomTransform
Custom transform action, null if none
Public fieldDelay
Minimum delay
Public fieldDelayRange
How long to wait in seconds before starting additional lightning bolts
Public fieldEnd
End of the bolt
Public fieldEndVariance
X, Y and Z radius variance from End
Public fieldEndWidthMultiplier
The ending width of a segment of lightning
Public fieldFadeFullyLitMultiplier
Modify the fully lit time for FadePercent (0 - 1)
Public fieldFadeInMultiplier
Modify the fade in time for FadePercent (0 - 1)
Public fieldFadeOutMultiplier
Modify the fade out time for FadePercent (0 - 1)
Public fieldFadePercent
The percent of time the lightning should fade in and out (0 - 1). Example: 0.2 would fade in for 20% of the lifetime and fade out for 20% of the lifetime. Set to 0 for no fade.
Public fieldForkedness
How forked the lightning should be, 0 for none, 1 for LOTS of forks
Public fieldForkEndWidthMultiplier
Forks will have their end widths multiplied by this value
Public fieldForkLengthMultiplier
Minimum distance multiplier for forks
Public fieldForkLengthVariance
Variance of the fork distance (random range of 0 to n is added to ForkLengthMultiplier)
Public fieldGenerationWhereForksStopSubtractor
This is subtracted from the initial generations value, and any generation below that cannot have a fork
Public fieldGenerator
Generator to create the lightning bolt from the parameters
Public fieldGlowIntensity
Intensity of the glow
Public fieldGlowWidthMultiplier
Glow width multiplier
Public fieldIntensity
Intensity of the lightning
Public fieldLifeTime
How long the bolt should live in seconds
Public fieldLightParameters
Light parameters, null for none
Public fieldStatic memberQualityMaximums
Contains quality settings for different quality levels. By default, this assumes 6 quality levels, so if you have your own custom quality setting levels, you may want to clear this dictionary out and re-populate it with your own limits
Public fieldStatic memberScale
Scale all scalar parameters by this value (i.e. trunk width, turbulence, turbulence velocity)
Public fieldSmoothingFactor
The amount of smoothing applied. For example, if there were 4 original points and smoothing / spline created 32 points, this value would be 8 - not all generators support this
Public fieldStart
Start of the bolt
Public fieldStartVariance
X, Y and Z radius variance from Start
Public fieldTrunkWidth
The width of the trunk
Top
See Also