Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
AudioFX Class Reference
Inheritance diagram for AudioFX:
EffectBehaviour

Public Types

enum  AudioChannel {
  AudioChannel.Ship, AudioChannel.Voice, AudioChannel.Ambient, AudioChannel.Music,
  AudioChannel.UI
}
 

Public Member Functions

override void OnEvent (float power)
 
override void OnEvent ()
 
override void OnInitialize ()
 
override void OnLoad (ConfigNode node)
 
override void OnSave (ConfigNode node)
 
void SetTime (float newTime)
 Changes the time of the audio source. More...
 
- Public Member Functions inherited from EffectBehaviour
virtual void OnEvent (int transformIdx)
 
virtual void OnEvent (float power, int transformIdx)
 

Static Public Member Functions

static void SetSourceVolume (AudioSource source, float volumeSet, AudioFX.AudioChannel channel)
 
- Static Public Member Functions inherited from EffectBehaviour
static void AddParticleEmitter (KSPParticleEmitter emitter)
 
static void AddParticleEmitter (ParticleSystem emitter)
 
static void OffsetParticles (Vector3d offset)
 
static void RemoveParticleEmitter (KSPParticleEmitter emitter)
 
static void RemoveParticleEmitter (ParticleSystem emitter)
 

Public Attributes

AudioChannel channel = AudioChannel.Ship
 
string clip = ""
 
bool loop = false
 
float maxVolumeDistance = 500f
 
FXCurve pitch = new FXCurve("pitch", 1f)
 
int polyphony = 1
 
FXCurve volume = new FXCurve("volume", 1f)
 
- Public Attributes inherited from EffectBehaviour
string effectName = ""
 
Part hostPart
 
string instanceName = ""
 

Member Enumeration Documentation

Enumerator
Ship 
Voice 
Ambient 
Music 
UI 

Member Function Documentation

override void AudioFX.OnEvent ( float  power)
inlinevirtual

Reimplemented from EffectBehaviour.

override void AudioFX.OnEvent ( )
inlinevirtual

Reimplemented from EffectBehaviour.

override void AudioFX.OnInitialize ( )
inlinevirtual

Reimplemented from EffectBehaviour.

override void AudioFX.OnLoad ( ConfigNode  node)
inlinevirtual

Reimplemented from EffectBehaviour.

override void AudioFX.OnSave ( ConfigNode  node)
inlinevirtual

Reimplemented from EffectBehaviour.

static void AudioFX.SetSourceVolume ( AudioSource  source,
float  volumeSet,
AudioFX.AudioChannel  channel 
)
inlinestatic
void AudioFX.SetTime ( float  newTime)
inline

Changes the time of the audio source.

Parameters
newTimeNew time to switch the audio source to.

Member Data Documentation

AudioChannel AudioFX.channel = AudioChannel.Ship
string AudioFX.clip = ""
bool AudioFX.loop = false
float AudioFX.maxVolumeDistance = 500f
FXCurve AudioFX.pitch = new FXCurve("pitch", 1f)
int AudioFX.polyphony = 1
FXCurve AudioFX.volume = new FXCurve("volume", 1f)

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