public Indicator(float originArg, float minArg = 0.0f, float maxArg = 100.0f) { origin = originArg; min = minArg; max = maxArg; value = MathFunc.Clamp(origin, min, max); }
public void SetDelta(float valArg, DeltaMode mode = DeltaMode.Const) { float fin = value; switch (mode) { case DeltaMode.Const: fin += valArg; break; case DeltaMode.Percentage: fin *= (1 + valArg); break; } value = MathFunc.Clamp(fin, min, max); }
public void Initialize() { value = MathFunc.Clamp(origin, min, max); }
public void SetValue(float valArg) { value = MathFunc.Clamp(valArg, min, max); }