private void Update() { // If this is the assigned controller and we're holding the grip // update UI or reset the window if (PW.WindowController == this) { if (_gripStartTime != 0) { // If it's been long enough, reset the window. if ((Time.time - _gripStartTime) > _resetTime) { _gripStartTime = 0; PW.WindowUI.ResetBar.Value = _gripStartTime; PW.ResetWindow(); } else { // Update the UI w/ % of grip time PW.WindowUI.ResetBar.Value = Mathf.Clamp01((Time.time - _gripStartTime) / _resetTime); } } else { PW.WindowUI.ResetBar.Value = _gripStartTime; } } }