Export (0) Print
Expand All

Cue.GetVariable Method

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

Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public float GetVariable (
         string name
)

Parameters

name
Friendly name of the variable.

Return Value

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 text string that the designer can associate with the cue when it is built.

Exception typeCondition
ArgumentNullException The name parameter is null.

Xbox 360, Windows XP SP2, Windows Vista

Community Additions

ADD
Show:
© 2014 Microsoft