Пример #1
0
 /// <summary>
 /// Parses the string representation of function in infix notation to a FunctionScript instance. Error messages are written when necessary.
 /// </summary>
 /// <param name="value">String representation of infix function.</param>
 /// <param name="func">FunctionScript instance generated from string.</param>
 /// <param name="field">Actual field name.</param>
 /// <param name="filename">File name.</param>
 /// <param name="line">Actual line number string.</param>
 private static void ParseInfixFunc(string value, ref FunctionScripts.FunctionScript func, string field, int line, string filename)
 {
     try {
         func = FunctionScripts.GetFunctionScriptFromInfixNotation(value);
     } catch (Exception ex) {
         Debug.AddMessage(Debug.MessageType.Error, false, ex.Message + " in " + field + " at line " + line.ToString(Culture) + " in file " + filename);
     }
 }
Пример #2
0
 internal SoundBuffer(SoundOrigin origin)
 {
     this.Origin               = origin;
     this.Radius               = 0.0;
     this.Loaded               = false;
     this.OpenAlBufferName     = 0;
     this.Duration             = 0.0;
     this.InternalVolumeFactor = 0.5;
     this.Ignore               = false;
     this.PitchFunction        = null;
     this.VolumeFunction       = null;
 }
Пример #3
0
 /// <summary>Creates a new sound buffer</summary>
 /// <param name="sound">The raw sound source, loaded via an API plugin</param>
 /// <param name="radius">The radius of the sound</param>
 internal SoundBuffer(OpenBveApi.Sounds.Sound sound, double radius)
 {
     this.Origin               = new RawOrigin(sound);
     this.Radius               = radius;
     this.Loaded               = false;
     this.OpenAlBufferName     = 0;
     this.Duration             = 0.0;
     this.InternalVolumeFactor = 0.5;
     this.Ignore               = false;
     this.PitchFunction        = null;
     this.VolumeFunction       = null;
 }
Пример #4
0
 /// <summary>Creates a new sound buffer</summary>
 /// <param name="path">The on-disk path to the sound to load</param>
 /// <param name="radius">The radius for this sound</param>
 internal SoundBuffer(string path, double radius)
 {
     this.Origin               = new PathOrigin(path);
     this.Radius               = radius;
     this.Loaded               = false;
     this.OpenAlBufferName     = 0;
     this.Duration             = 0.0;
     this.InternalVolumeFactor = 0.5;
     this.Ignore               = false;
     this.PitchFunction        = null;
     this.VolumeFunction       = null;
 }