Chunks
Moddable voxel sandbox for room-scale VR.
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Chunks.Audio.SoundEmitter Class Reference

Component that can emit sound effects from its location. More...

Inheritance diagram for Chunks.Audio.SoundEmitter:

Public Member Functions

void Play (SoundEffect effect)
 Start playing a given sound effect. More...
 
void Play (SoundEffect effect, Action< SoundModifier > modifier)
 Start playing a given sound effect with a parameter modification action. More...
 
void Stop ()
 Stop playing the current sound effect. More...
 

Public Attributes

bool IsPlaying => _inner.isPlaying
 True if this emitter is currently playing a sound effect. More...
 

Protected Member Functions

override void OnInitialize ()
 Called only once, when the component is first attached to an entity and is ready to add or retrieve other components. More...
 
override void OnDestroy ()
 Called when this component is removed, or the parent entity is destroyed. More...
 
override void OnEnable ()
 Called each time this component goes from being disabled to enabled. More...
 
override void OnDisable ()
 Called each time this component goes from being enabled to disabled. More...
 

Properties

SoundEffect SoundEffect [get]
 The sound effect currently attached to this emitter. More...
 
float SpacialBlend [get, set]
 
float Pitch [get, set]
 Pitch scale modifier, default is 1. More...
 
float Volume [get, set]
 Volume scale modifier, default is 1. More...
 

Detailed Description

Component that can emit sound effects from its location.

Member Function Documentation

override void Chunks.Audio.SoundEmitter.OnDestroy ( )
protected

Called when this component is removed, or the parent entity is destroyed.

override void Chunks.Audio.SoundEmitter.OnDisable ( )
protected

Called each time this component goes from being enabled to disabled.

override void Chunks.Audio.SoundEmitter.OnEnable ( )
protected

Called each time this component goes from being disabled to enabled.

override void Chunks.Audio.SoundEmitter.OnInitialize ( )
protected

Called only once, when the component is first attached to an entity and is ready to add or retrieve other components.

void Chunks.Audio.SoundEmitter.Play ( SoundEffect  effect)

Start playing a given sound effect.

Parameters
effectSound effect resource to play
void Chunks.Audio.SoundEmitter.Play ( SoundEffect  effect,
Action< SoundModifier modifier 
)

Start playing a given sound effect with a parameter modification action.

Parameters
effectSound effect resource to play
modifierParameter modification action
void Chunks.Audio.SoundEmitter.Stop ( )

Stop playing the current sound effect.

Member Data Documentation

bool Chunks.Audio.SoundEmitter.IsPlaying => _inner.isPlaying

True if this emitter is currently playing a sound effect.

Property Documentation

float Chunks.Audio.SoundEmitter.Pitch
getset

Pitch scale modifier, default is 1.

SoundEffect Chunks.Audio.SoundEmitter.SoundEffect
get

The sound effect currently attached to this emitter.

float Chunks.Audio.SoundEmitter.SpacialBlend
getset
float Chunks.Audio.SoundEmitter.Volume
getset

Volume scale modifier, default is 1.


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