Table of Contents

Constructor ObservedThreshold

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

ObservedThreshold(float, float, Func<float, float>)

Creates a new observed threshold that watches a value and notifies when it crosses the given threshold. An optional transform function can be applied before comparison.

public ObservedThreshold(float value, float threshold, Func<float, float> transform = null)

Parameters

value float

Initial value.

threshold float

The threshold to compare against.

transform Func<float, float>

Optional value transform before comparison.