private void SetToggleMode() { enableFade = false; barState = new ToggleState(startPos, endPos, this, rectTransform, scriptToMonitor, toggleTime, canvasGroup); }
private void SetValueMode() { var fields = scriptToMonitor.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Where(field => field.FieldType == typeof(float)).ToList(); barState = new ValueState(startPos, endPos, this, rectTransform, scriptToMonitor, fields[currentIndex], fields[minIndex], fields[maxIndex], canvasGroup,useFill,fillImage); }
private void SetTimeMode() { var fields = scriptToMonitor.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Where(field => field.FieldType == typeof(float)).ToList(); barState = new TimeState(startPos, endPos, this, scriptToMonitor, rectTransform, fields[timeIndex], canvasGroup); }