private Submarine_Resources sub_res; //Use to get the Submarine_Resource component info. #endregion Fields #region Methods // Use this for initialization void Start() { if (subt < 0.0f) subt = 0.001f; sub_res = GetComponent<Submarine_Resources>(); oxygenValue = sub_res.getOxygenLevel(); saturationValue = Camera.main.GetComponent<ColorCorrectionCurves>().saturation; }
// Use this for initialization void Start() { //This guarantee the volome does not go beyond 20.0f as the highest value is 20.0f if (maxSnd > 20.0f) maxSnd = 20.0f; if (minSnd < -80.0f) minSnd = -80.0f; sub_res = GetComponent<Submarine_Resources>(); oxygenValue = sub_res.getOxygenLevel(); }