Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Substance"/> class.
 /// </summary>
 /// <param name="type">The MaterialType of the substance.</param>
 /// <param name="mass">The mass of substance to be created.</param>
 /// <param name="tempInCelsius">The temperature of the substance in celsius.</param>
 /// <param name="state">The material state of the substance.</param>
 public Substance(MaterialType type, double mass, double tempInCelsius, MaterialState state = MaterialState.Unknown)
 {
     if (mass > float.MaxValue)
     {
         mass = float.MaxValue;
     }
     m_ssh       = new MementoHelper(this, true);
     m_type      = type;
     m_mass      = mass;
     Temperature = tempInCelsius;
     State       = state;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Substance"/> class.
 /// </summary>
 public Substance()
 {
     m_ssh = new MementoHelper(this, true);
 }