public static void LockedApply <T>(object lockObj, ref Mod.Config.Switchable <T> target, T value) { // don't change the switch... lock (lockObj) { target.Value = value; } }
public SliderOption( float minValue, float maxValue, float stepSize, float defaultValue, Mod.Config.Switchable <T> .SlideHandler onValueChanged ) { this.minValue = minValue; this.maxValue = maxValue; this.stepSize = stepSize; this.initialValue = defaultValue; this.onValueChanged = onValueChanged; }