Beispiel #1
0
    // 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);
    }
Beispiel #2
0
    // 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);
        }
    }