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)
Syntax
public float GetVariable (
string name
)
Parameters
- name
Friendly name of the variable.
Return Value
Value of the variable.
Remarks
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.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | The name parameter is null. |
See Also
Reference
Cue Class
Cue Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista