Пример #1
0
 /// <summary>
 /// Sets moles for a specific gas to a specific value in the gas data
 /// </summary>
 public static void SetMoles(this GasData data, GasSO gasType, float moles)
 {
     InternalSetMoles(data, gasType, moles, false);
 }
Пример #2
0
 /// <summary>
 /// Adds/Removes moles for a specific gas in the gas data
 /// </summary>
 public static void ChangeMoles(this GasData data, GasSO gasType, float moles)
 {
     InternalSetMoles(data, gasType, moles, true);
 }
Пример #3
0
 /// <summary>
 /// Gets a specific gas from the gas array, returns null if gas isn't in mix
 /// </summary>
 public static void GetGasType(this GasData data, GasSO gasType, out GasValues gasData)
 {
     gasData = GetGasType(data, gasType);
 }
Пример #4
0
 /// <summary>
 /// Gets moles of a specific gas from the gas array, returns 0 if gas isn't in mix
 /// </summary>
 public static void GetGasMoles(this GasData data, GasSO gasType, out float gasMoles)
 {
     gasMoles = GetGasMoles(data, gasType);
 }
Пример #5
0
 /// <summary>
 /// Gets moles of a specific gas from the gas array, returns 0 if gas isn't in mix
 /// </summary>
 public static float GetGasMoles(this GasData data, int gasType)
 {
     return(GetGasType(data, gasType)?.Moles ?? 0);
 }
Пример #6
0
 /// <summary>
 /// Checks to see if the gas mix contains a specific gas
 /// </summary>
 public static bool HasGasType(this GasData data, GasSO gasType)
 {
     return(data.GasesDict.ContainsKey(gasType));
 }