private void Call(bool value) { if (UseStaticValue) { if (value) { if (ClickSound) { if (NextSound < Time.time) { Audio2DListener.PlayUI(ClickSound, 1); NextSound = Time.time + SoundLag; } } SetValue(StaticValueBinding.MemberName, StaticValue); } } else { if (ClickSound) { if (NextSound < Time.time) { Audio2DListener.PlayUI(ClickSound, 1); NextSound = Time.time + SoundLag; } } SetValue(ValueBinding.MemberName, value); } }
private void Update() { if (Target.text != oldText) { if (Target.text.Contains("\t")) { Target.text = Target.text.Replace("\t", string.Empty); return; } if (TypeSound) { if (NextSound < Time.time) { Audio2DListener.PlayUI(TypeSound, 1); NextSound = Time.time + SoundLag; } } UpdateText(Target.text); } }
private void HandleChange(float arg) { if (!Application.isPlaying) { return; } if (SwipeSound != null) { if (NextSwipe < Time.time) { Audio2DListener.PlayUI(SwipeSound, 1); NextSwipe = Time.time + SoundLag; } } SetValue(ValueBinding.MemberName, arg); }