C# Class HoloToolkit.Unity.ActiveEvent

Currently active AudioEvents along with their AudioSource components for instance limiting events
Inheritance: IDisposable
Exibir arquivo Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Public Properties

Property Type Description
SpatialRolloff UnityEngine.AnimationCurve
activeTime float
altVolDest float
audioEvent AudioEvent
cancelEvent bool
currentFade float
isActiveTimeComplete bool
isStoppable bool
playingAlt bool
volDest float

Public Methods

Method Description
ActiveEvent ( AudioEvent audioEvent, GameObject emitter, AudioSource primarySource, AudioSource secondarySource, string messageOnAudioEnd = null ) : System
CreateFlatSpatialRolloffCurve ( ) : void

Creates a flat animation curve to negate Unity's distance attenuation when using Spatial Sound

Dispose ( ) : void
SetPitch ( float newPitch ) : void

Sets the pitch value for the primary source.

Private Methods

Method Description
SetSourceProperties ( ) : void

Set the volume, spatialization, etc., on our AudioSources to match the settings on the event to play.

Method Details

ActiveEvent() public method

public ActiveEvent ( AudioEvent audioEvent, GameObject emitter, AudioSource primarySource, AudioSource secondarySource, string messageOnAudioEnd = null ) : System
audioEvent AudioEvent
emitter UnityEngine.GameObject
primarySource UnityEngine.AudioSource
secondarySource UnityEngine.AudioSource
messageOnAudioEnd string
return System

CreateFlatSpatialRolloffCurve() public static method

Creates a flat animation curve to negate Unity's distance attenuation when using Spatial Sound
public static CreateFlatSpatialRolloffCurve ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

SetPitch() public method

Sets the pitch value for the primary source.
public SetPitch ( float newPitch ) : void
newPitch float The value to set the pitch, between 0 (exclusive) and 3 (inclusive).
return void

Property Details

SpatialRolloff public_oe static_oe property

public static AnimationCurve,UnityEngine SpatialRolloff
return UnityEngine.AnimationCurve

activeTime public_oe property

public float activeTime
return float

altVolDest public_oe property

public float altVolDest
return float

audioEvent public_oe property

public AudioEvent audioEvent
return AudioEvent

cancelEvent public_oe property

public bool cancelEvent
return bool

currentFade public_oe property

public float currentFade
return float

isActiveTimeComplete public_oe property

public bool isActiveTimeComplete
return bool

isStoppable public_oe property

public bool isStoppable
return bool

playingAlt public_oe property

public bool playingAlt
return bool

volDest public_oe property

public float volDest
return float