private void Update() { if (Overlay.overlay != null) { Overlay.overlay.onDashboardChange = OnDashboardChange; } if (timer > 0f && !isDashboardOpen) { timer -= Time.deltaTime; if (timer < 0f) { timer = 0f; } var op = Mathf.Lerp(cfg.Opacity, cfg.NotificationOpacity, timer / cfg.FadeTime); Overlay.SetOpacity(op); } }
public void SetBrightness(double brightness) { uo.SetOpacity(1 - (float)brightness + 0.001f); }