void FixedUpdate()
    {
        float extraDepth = minDepth - plane.transform.position.y;

        if (extraDepth > 0f)
        {
            plane.Damage(extraDepth * pressureDpsPerMeter * Time.fixedDeltaTime);
        }

        float density = resourceCalculator.GetDensity();

        if (density < 0f)
        {
            return;
        }

        float damage = damageVsDensity.Evaluate(density);

        plane.Damage(density * Time.fixedDeltaTime * densityDamageMultiplier);
    }
    void FixedUpdate()
    {
        float light   = resourceCalculator.GetLight();
        float density = resourceCalculator.GetDensity();

        if (light < 0f || density < 0f)
        {
            // TODO display error to client
            Debug.LogWarning("Resource controller cannot calculate resources");
            return;
        }

        float depth = Mathf.Clamp01(-plane.transform.position.y / 1400f + 0.5f);

        plane.RefuelEnergy(energyMultiplier * energyVsLight.Evaluate(light) * Time.fixedDeltaTime);
        plane.RefuelMatter(matterMultiplier * matterVsDensity.Evaluate(density) * matterVsDepth.Evaluate(depth) * Time.fixedDeltaTime);

        if (plane.TrySpendEnergy(baseEnergyPerSecond * Time.fixedDeltaTime) == false)
        {
            deathController.KillPlane();
        }
    }