public float value
{
get
{
if (numberOfSteps > 1) return Mathf.Round(mValue * (numberOfSteps - 1)) / (numberOfSteps - 1);
return mValue;
}
set
{
float val = Mathf.Clamp01(value);
if (mValue != val)
{
int before = (int)Mathf.Round(this.value * 1000);
mValue = val;
if (NGUITools.GetActive(this))
{
if (before != Mathf.Round(this.value * 1000))
{
if (EventDelegate.IsValid(onChange))
{
current = this;
EventDelegate.Execute(onChange);
current = null;
}
ForceUpdate();
}
#if UNITY_EDITOR
if (!Application.isPlaying)
NGUITools.SetDirty(this);
#endif
}
}
}
}