// Use this for initialization void Start() { System.Type t = output.obj.GetType(); if (incremental) { List <GameObject> children = new List <GameObject>(); for (int i = 0; i < transform.childCount; i++) { children.Add(transform.GetChild(i).gameObject); } children.OrderBy(x => x.transform.localPosition.sqrMagnitude); for (int i = 0; i < children.Count; i++) { output.obj = children[i].GetComponent(t); output.SetValue(incrementAmount * i); } } else { for (int i = 0; i < transform.childCount; i++) { output.obj = transform.GetChild(i).GetComponent(t); output.SetValue(transform.GetChild(i).localPosition.sqrMagnitude); } } }
// Update is called once per frame void Update() { if (everyFrame) { field.SetValue(Mathf.Lerp(min, max, Random.value)); } }
// Update is called once per frame void Update() { if (!mouseDown || (mouseDown && Input.GetMouseButton(0))) { pos = Vector3.Lerp(Input.mousePosition, pos, smoothing); if (xAxis) { output.SetValue(Mathf.Lerp(min, max, pos.x / Screen.width)); } else { output.SetValue(Mathf.Lerp(min, max, pos.y / Screen.height)); } } }
// Update is called once per frame void Update() { for (int i = 0; i < group.all.Count; i++) { output.obj = group.all[i].GetComponent(type); output.SetValue(Utils.Lerp(minValue, maxValue, ccAudioController.FFT[(int)Mathf.Lerp(minFFT, maxFFT, (float)i / group.all.Count)])); } }
void Update() { //if (round) { if (v != t) { v = Mathf.Lerp(v, t, .2f); obj.SetValue(v); } //} }
// Update is called once per frame void Update() { Vector3 p0 = screenCamera.WorldToScreenPoint(minPosition.position); Vector3 p1 = screenCamera.WorldToScreenPoint(maxPosition.position); if (down) { Vector2 p = Input.mousePosition.xy(); Vector2 a2p = new Vector2(p.x - p0.x, p.y - p0.y); Vector2 a2b = new Vector2(p1.x - p0.x, p1.y - p0.y); t = Vector2.Dot(a2p, a2b) / Vector2.SqrMagnitude(a2b); } v = Mathf.Lerp(v, t, smoothing); transform.position = screenCamera.ScreenToWorldPoint(Vector3.Lerp(p0, p1, v)); output.SetValue(Mathf.Lerp(minMax.x, minMax.y, v)); }
// Update is called once per frame void Update() { if ((animTime < time && fwd) || (animTime > 0 && !fwd)) { if (fwd) { animTime += Time.deltaTime; } else { animTime -= Time.deltaTime; } field.SetValue(Mathf.Lerp(min, max, animation.Evaluate(animTime / time))); } else if (!fired) { fired = true; Messenger.Broadcast(firePostAnimation); } }
void Increase() { reflectFloat.SetValue((float)reflectFloat.GetFloat() + 1); }
public override void Update() { base.Update(); field.SetValue(Mathf.Lerp(minValue, maxValue, value)); }
void Update() { output.SetValue(Utils.Lerp(min, max, curve.Evaluate(t))); }
// Update is called once per frame void Update() { v += speed * Time.deltaTime; output.SetValue(v); }
// Update is called once per frame void Update() { field.SetValue(Mathf.Lerp(min, max, Random.value)); }
protected override void OnEvent() { outValue.SetValue(val); }
// Update is called once per frame void Update() { output.SetValue(((float)input.GetValue()) * multiplier); }
// Update is called once per frame void Update() { field.SetValue(min + (max - min) * ccAudioController.FFT [fft]); }