Cue.GetVariable Method (Microsoft.Xna.Framework.Audio)

Gets a cue-instance variable value based on its friendly name.

Namespace: Microsoft.Xna.Framework.Audio
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public float GetVariable(
	string name
)

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

name
Type: System.String
Friendly name of the variable.

Return Value

Type: System.Single
Value of the variable.
Cue-instance variables are useful when multiple instantiations of a single cue (and its associated sounds) are required (for example, a "car" cue where there may be more than one car at any given time). While a global variable allows multiple audio elements to be controlled in unison, a cue instance variable grants discrete control of each instance of a cue, even for each copy of the same cue.The friendly name is a value set from the designer.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web