// Update is called once per frame void Update() { if (IsPumping() && flood != null) { elapsed += Time.deltaTime; flood.ChangeWaterValue(-(Time.deltaTime / length) * amount); } }
// Update is called once per frame void Update() { foreach (Leak leak in leaks) { if (!leak.IsFixed()) { flood.ChangeWaterValue(leak.waterPerSec * Time.deltaTime); } } }