예제 #1
0
    // Give modifier for fuel burn rate -- 1.0 is full burn (multiplied by throttle to get thrust and true burn rate)
    private float calculateFuelBurnMod(float altitude, float altitudeResiliency)
    {
        float resultMod = 0.0f;

        currentAirDensity = air.getDensityAtAltitude(altitude);
        float resil = Mathf.Clamp(1.0f - altitudeResiliency, 0.0f, 1.0f);

        resultMod      = Mathf.Pow(currentAirDensity, resil);
        currentBurnMod = resultMod;

        return(resultMod);
    }