Beispiel #1
0
 /// <summary>
 /// Sets the value of a cue-instance variable based on its friendly name.
 /// </summary>
 /// <param name="name">Friendly name of the variable to set.</param>
 /// <param name="value">Value to assign to the variable.</param>
 /// <remarks>The friendly name is a value set from the designer.</remarks>
 public void SetVariable(string name, float value)
 {
     if (name == "Volume")
     {
         _volume = value;
         if (_curSound != null)
         {
             _curSound.SetCueVolume(_volume);
         }
     }
     else
     {
         _engine.SetGlobalVariable(name, value);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Sets the value of a cue-instance variable based on its friendly name.
 /// </summary>
 /// <param name="name">Friendly name of the variable to set.</param>
 /// <param name="value">Value to assign to the variable.</param>
 /// <remarks>The friendly name is a value set from the designer.</remarks>
 public void SetVariable(string name, float value)
 {
     if (name == "Volume")
     {
         volume = value;
         if (curSound != null)
         {
             curSound.Volume = value;
         }
     }
     else
     {
         engine.SetGlobalVariable(name, value);
     }
 }
Beispiel #3
0
 public void SetVariable(string name, float value)
 {
     if (name == "Volume")
     {
         volume = value;
         if (curSound != null)
         {
             curSound.Volume = value * rpcVolume;
         }
     }
     else if (curSound != null && curSound.rpcVariables.ContainsKey(name))
     {
         curSound.rpcVariables[name] = value;
     }
     else
     {
         engine.SetGlobalVariable(name, value);
     }
 }