setMaxEnergy() 공개 메소드

public setMaxEnergy ( float v ) : void
v float
리턴 void
예제 #1
0
    /*!
    \brief This function load the maximum energy in 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 loadMaxEnergy(string value, Medium med)
    {
        float prodMax;

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