// Adjusts the time rate based on the collection of factors. private void UpdateTimeRate() { float product = 1.0f; foreach (float fact in factors.GetAllValues()) { product *= fact; } timeObservable.SetTimeRate(product); }
// Adjusts the product based on the collection of factors. private void UpdateProduct() { float product = 1.0f; foreach (float fact in factors.GetAllValues()) { product *= fact; } if (productUpdated != null) { productUpdated(product); } }