Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Properties | List of all members
FXGroup Class Reference

An FX group is a wrapper for a collection of effects. It abstracts the effects themselves, so it's possible to have any number of effects assigned to a group, or none. A group holds collections for particle emmiters, lights, and sound. All are executed when the effect is on. FX Groups are used by Parts, since the number or position of effect nodes is unknown. Instead of handling the effects themselves, the parts handle FXGroups More...

Public Member Functions

void begin (AudioSource audioRef)
 
void Burst ()
 Will do a single burst of all particle emmiters in the group More...
 
 FXGroup (string groupID)
 
void setActive (bool value)
 controls whether the effect is continuously active or not. More...
 
void setActiveWithAudioFade (bool value, float audioFadeLength)
 Set this fx group active or inactive, fading the audio source in audioFadeLength time More...
 
void SetLatch (bool latch)
 Sets the active group active state to true, but not to false. Use when effects are assigned to multiple conflicting groups. Don't forget to unlatch them. More...
 
void SetPower (float pwr)
 Sets the active group power to the given value. More...
 
void SetPowerLatch (float pwr)
 Sets the active group power to the given value, only if the given value is higher than the current one. Use to solve conflicts. More...
 
void SetVisualMinMax (float min, float max)
 Sets the FX visual min and max range for this FXGroup More...
 
void Unlatch ()
 Deactivates the group, if it's been activated with SetLatch. Also resets all power latches More...
 

Public Attributes

bool activeLatch
 
AudioSource audio = null
 
bool clampVisualPower = false
 This will be set true ONLY if SetVisualMinMax if called or minVisualPower or maxVisualPower are set. More...
 
List< ParticleSystem > fxEmittersNewSystem = new List<ParticleSystem>()
 A collection of gameObjects with particle emmiters More...
 
List< Lightlights = new List<Light>()
 A collection of gameObjects with Light Components More...
 
string name
 
float powerVariation = 0f
 
AudioClip sfx = null
 

Properties

bool Active [get]
 
bool isValid [get]
 
float maxVisualPower [get, set]
 The max visual power the FX is clamped between (default is 1) More...
 
float minVisualPower [get, set]
 The min visual power the FX is clamped between (default is 0) More...
 
float Power [get, set]
 controls the overall size of the effects. More...
 

Detailed Description

An FX group is a wrapper for a collection of effects. It abstracts the effects themselves, so it's possible to have any number of effects assigned to a group, or none. A group holds collections for particle emmiters, lights, and sound. All are executed when the effect is on. FX Groups are used by Parts, since the number or position of effect nodes is unknown. Instead of handling the effects themselves, the parts handle FXGroups

Constructor & Destructor Documentation

FXGroup.FXGroup ( string  groupID)
inline

Member Function Documentation

void FXGroup.begin ( AudioSource  audioRef)
inline
void FXGroup.Burst ( )
inline

Will do a single burst of all particle emmiters in the group

void FXGroup.setActive ( bool  value)
inline

controls whether the effect is continuously active or not.

void FXGroup.setActiveWithAudioFade ( bool  value,
float  audioFadeLength 
)
inline

Set this fx group active or inactive, fading the audio source in audioFadeLength time

Parameters
behaviour
value
void FXGroup.SetLatch ( bool  latch)
inline

Sets the active group active state to true, but not to false. Use when effects are assigned to multiple conflicting groups. Don't forget to unlatch them.

Parameters
latch
void FXGroup.SetPower ( float  pwr)
inline

Sets the active group power to the given value.

Parameters
pwr
void FXGroup.SetPowerLatch ( float  pwr)
inline

Sets the active group power to the given value, only if the given value is higher than the current one. Use to solve conflicts.

Parameters
pwr
void FXGroup.SetVisualMinMax ( float  min,
float  max 
)
inline

Sets the FX visual min and max range for this FXGroup

Parameters
min
max
void FXGroup.Unlatch ( )
inline

Deactivates the group, if it's been activated with SetLatch. Also resets all power latches

Member Data Documentation

bool FXGroup.activeLatch
AudioSource FXGroup.audio = null
bool FXGroup.clampVisualPower = false

This will be set true ONLY if SetVisualMinMax if called or minVisualPower or maxVisualPower are set.

List<ParticleSystem> FXGroup.fxEmittersNewSystem = new List<ParticleSystem>()

A collection of gameObjects with particle emmiters

List<Light> FXGroup.lights = new List<Light>()

A collection of gameObjects with Light Components

string FXGroup.name
float FXGroup.powerVariation = 0f
AudioClip FXGroup.sfx = null

Property Documentation

bool FXGroup.Active
get
bool FXGroup.isValid
get
float FXGroup.maxVisualPower
getset

The max visual power the FX is clamped between (default is 1)

float FXGroup.minVisualPower
getset

The min visual power the FX is clamped between (default is 0)

float FXGroup.Power
getset

controls the overall size of the effects.


The documentation for this class was generated from the following file: