Exemplo n.º 1
0
 void AdvanceValues()
 {
     _temp = _gasesWeight.TotalSum() / _gasBreakPoint;
     if (_temp >= 5)
     {
         GameOver(false);
     }
     if (_date >= _goalDateT)
     {
         GameOver(true);
     }
 }
Exemplo n.º 2
0
    public void GeneratePercentage(Gases gases)
    {
        float tsum = gases.TotalSum();

        if (tsum == 0)
        {
            return;
        }
        waterVapour   = HelperFuncs.RoundToDecimals((gases.waterVapour / tsum) * 100, 1);
        carbonDioxide = HelperFuncs.RoundToDecimals((gases.carbonDioxide / tsum) * 100, 1);
        methane       = HelperFuncs.RoundToDecimals((gases.methane / tsum) * 100, 1);
        nitrousOxide  = HelperFuncs.RoundToDecimals((gases.nitrousOxide / tsum) * 100, 1);
        CFCs          = HelperFuncs.RoundToDecimals((gases.CFCs / tsum) * 100, 1);
    }