103 identifier =
"NO_SOUNDSET";
106 return string.
Format(
"%1:%2", super.GetDebugName(), identifier);
393 SoundError(
"FadeIn is longer than sound wave length.");
399 SoundError(
"FadeOut is longer than sound wave length.");
405 SoundError(
"FadeIn & FadeOut are longer than sound wave length.");
513 super.Event_OnRegistered(
id);
524 super.Event_OnUnregistered();
589 super.SetAutodestroy(auto_destroy);
637 super.SetParent(parent_obj);
651 return super.GetParent();
663 super.SetCurrentParent(parent_obj, updateCached);
678 return super.GetParent();
688 super.SetCurrentPosition(pos, updateCached);
703 return super.GetCurrentPosition();
713 super.SetCurrentLocalPosition(pos, updateCached);
742 return super.GetCurrentLocalPosition();
ref ScriptInvoker Event_OnEffectStarted
Event used when the actual effect started playing.
EffectType
Enum to determine what type of effect the Effect is.
protected bool m_IsPlaying
Whether the Effect is currently playing.
ref ScriptInvoker Event_OnEffectEnded
Event used when the actual effect stopped playing.
vector GetLocalPosition()
Get the local position of the Effect.
ref ScriptInvoker Event_OnStopped
Event used when Stop was called.
Event_OnStarted
Event used when Start was called.
class SoundObjectBuilder SoundObject(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
proto void Loop(bool setLoop)
proto void SetVolumeRelative(float value)
proto bool IsHeaderLoaded()
AbstractWaveEvents GetEvents()
proto float GetLength()
WARNING: Blocking! Waits for header to load.
proto native AbstractSoundScene GetSoundScene()
Wrapper class for managing sound through SEffectManager.
protected ref SoundObject m_SoundObject
void SetEnviromentVariables(bool setEnvVariables)
Sets whether UpdateEnvSoundControllers needs to be called during Loading.
ref ScriptInvoker Event_OnSoundFadeOutStarted
bool SoundPlay()
Plays sound.
override string GetDebugName()
Override when getting debug information.
protected void SoundReset()
Resets EffectSound.
ref ScriptInvoker Event_OnSoundWaveEnded
protected float m_SoundWaveTime
override void SetCurrentPosition(vector pos, bool updateCached=true)
Set the world position of the managed sound.
override void Event_OnUnregistered()
Event called from SEffectManager when the Effect is unregistered.
protected bool m_SoundWaveIsPlaying
void SetSoundSet(string snd)
Set soundset for the sound.
protected AbstractWave m_SoundWaveObject
override void SetCurrentParent(Object parent_obj, bool updateCached=true)
Set parent for the sound to follow.
override void InitEffect()
init
protected float m_SoundWaveVolume
void Event_OnSoundWaveStarted()
Event called when sound starts playing.
void Event_OnSoundFadeOutStarted()
Event called when sound fade out starts.
protected float m_SoundFadeOutDuration
protected bool m_SoundWaveStopping
bool IsSoundPlaying()
Get whether EffectSound is currently playing.
bool SoundLoad()
Loads in the sound when it is requested for playing.
void SetSoundVolume(float volume)
Set the RELATIVE volume for the sound.
void SetSoundMaxVolume(float volume)
Set the sound max volume.
override void Start()
Plays sound.
bool SoundLoadEx(out SoundParams params)
Loads in the sound when it is requested for playing through 'SoundPlayEx'.
override bool IsSound()
Check whether the Effect is EffectSound without casting.
protected bool m_SetEnvVariables
override vector GetCurrentPosition()
Get the current world position of the managed sound.
protected float m_SoundFadeInDuration
protected float m_SoundFadeOutInitVolume
protected bool m_SoundLoop
bool IsSoundAutodestroy()
Get whether EffectSound automatically cleans up when sound stops.
override vector GetCurrentLocalPosition()
Get the current local position of the managed sound.
protected void UpdateEvents()
Enables the frame event on the EffectSound.
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
float GetSoundWaveLenght()
Get the sound wave length.
string GetSoundSet()
Get soundset for the sound.
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
protected Object m_SoundParent
protected ref SoundObjectBuilder m_SoundObjectBuilder
void SetSoundAutodestroy(bool auto_destroy)
Sets whether EffectSound automatically cleans up when sound stops.
protected bool m_SoundWaveStarting
protected float m_SoundWaveLenght
float GetSoundWaveTime()
Get the time since EffectSound started playing.
override void Stop()
Stops sound.
ref ScriptInvoker Event_OnSoundFadeInStopped
protected float m_SoundWaveVolumeMax
protected void SoundError(string err_msg)
Helper for throwing sound errors.
void Event_OnSoundFadeInStopped()
Event called when sound fade in stops.
override void Event_OnFrameUpdate(float time_delta)
Event called on frame when enabled by SetEnableEventFrame(true)
override void Event_OnRegistered(int id)
Event called from SEffectManager when the Effect is registered.
override Object GetParent()
Get parent for the EffectSound.
protected ref SoundParams m_SoundParams
override Object GetCurrentParent()
Get parent for the EffectSound.
override void SetParent(Object parent_obj)
Set parent for the sound to follow.
bool IsSoundValid()
Helper for checking if params are valid.
protected void ValidateSoundWave()
Gets called to fill in the necessary data when the header has finished loading.
override bool IsAutodestroy()
Get whether Effect automatically cleans up when it stops.
protected string m_SoundSetName
float GetSoundWaveLength()
Get the sound wave length.
protected float m_SoundFadeOutStartTime
void SoundStop()
Stops sound.
override void SetCurrentLocalPosition(vector pos, bool updateCached=true)
Set the current local position of the managed sound.
void SetSoundFadeIn(float fade_in)
Set the sound fade in duration.
bool SoundPlayEx(out SoundParams params)
Plays sound.
ref ScriptInvoker Event_OnSoundWaveStarted
float GetSoundVolume()
Get the RELATIVE volume set by 'SetSoundVolume'.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
override EffectType GetEffectType()
Get what type of effect the Effect is.
void SetSoundLoop(bool loop)
Set if the sound loops.
protected bool m_SoundAutodestroy
override bool IsPlaying()
Returns true when the effect is playing, false otherwise.
void Event_OnSoundWaveEnded()
Event called when sound stops playing.
protected WaveKind m_SoundWaveKind
protected bool SoundWaveValidation()
Validation of fade settings.
Manager class for managing Effect (EffectParticle, EffectSound)
static void Event_OnSoundWaveEnded(EffectSound effect_sound)
Event called from EffectSound.Event_OnSoundWaveEnded.
ScriptInvoker Class provide list of callbacks usage:
proto bool Remove(func fn, int flags=EScriptInvokerRemoveFlags.ALL)
remove specific call from list
proto void Invoke(void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
invoke call on all inserted methods with given arguments
proto bool Insert(func fn, int flags=EScriptInvokerInsertFlags.IMMEDIATE)
insert method to list
proto native void UpdateEnvSoundControllers(vector position)
SoundObject BuildSoundObject()
proto native bool IsValid()
proto native CGame GetGame()
void SetEnableEventFrame(bool enable)
Enable Event_OnFrameUpdate for the effect.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.