setEnergyProductionRate() public method

public setEnergyProductionRate ( float v ) : void
v float
return void
Esempio n. 1
0
    /*!
    \brief This function load the energy production rate of the medium and parse the validity of the given string
    \param value The value to parse and load
    \param med The medium to initialize
    \return Return true if the function succed to parse the string or false else
       */
    private bool loadEnergyProductionRate(string value, Medium med)
    {
        float productionRate;

        if (String.IsNullOrEmpty(value))
          {
        Debug.Log("Error: Empty EnergyProductionRate field. default value = 0");
        productionRate = 0f;
          }
        else
          productionRate = float.Parse(value.Replace(",", "."));
        med.setEnergyProductionRate(productionRate);
        return true;
    }