static public int SetValueWithoutNotify(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif UnityEngine.UI.Slider self = (UnityEngine.UI.Slider)checkSelf(l); System.Single a1; checkType(l, 2, out a1); self.SetValueWithoutNotify(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
void Update() { if (isDragged) { isDragged = false; return; } int targ = GetTarget(); float pos = GetTargetRelativePosition(targ); if (pos == slider.normalizedValue) { v = 0f; next_slot = -1; if (last_active_slot != targ) { last_active_slot = targ; if (FieldActions.Count > targ) { FieldActions[targ].Invoke(); } } return; } v += feather_k * (pos - slider.normalizedValue); slider.SetValueWithoutNotify(slider.maxValue * (slider.normalizedValue += v * Time.deltaTime)); last_pos = slider.normalizedValue; }
private void SetHeightForActiveObject(float value) { activeObject.Adjustment = value; jsonDataForCurrentObject.text = WriteObjectToJson(activeObject); heightSlider.SetValueWithoutNotify(value); heightInputText.text = value.ToString(); defaultHeight = value; }
private void SetRadiusForActiveObject(int value) { activeObject.Radius = value; jsonDataForCurrentObject.text = WriteObjectToJson(activeObject); radiusSlider.SetValueWithoutNotify(value); radiusInputText.text = value.ToString(); defaultRadius = value; }
private void Start() { float music = PlayerPrefs.GetFloat("volume", -10); Slider musicSlider = GameObject.Find("MusiqueSlider").GetComponent <Slider>(); musicSlider.SetValueWithoutNotify(music); AdjustMusicVolume(music); }
static int SetValueWithoutNotify(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityEngine.UI.Slider obj = (UnityEngine.UI.Slider)ToLua.CheckObject <UnityEngine.UI.Slider>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.SetValueWithoutNotify(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public void changeSfxVolumeWidgetValue(float value) { sfxSlider.SetValueWithoutNotify(value); }
public void changeMusicVolumeWidgetValue(float value) { musicSlider.SetValueWithoutNotify(value); }