示例#1
0
 private IEnumerator TriggerDisappearingCoroutine()
 {
     while (_lerpCoeff > 0f)
     {
         _lerpCoeff -= (1.1f - _lerpCoeff) * _appearingRate * Time.unscaledDeltaTime;
         _titlebarMask.sizeDelta = new Vector2(Mathf.Lerp(-_windowSize.x, 0, _lerpCoeff), _titlebarMask.sizeDelta.y);
         _contentMask.sizeDelta  = new Vector2(_titlebarMask.sizeDelta.x, Mathf.Lerp(_titlebarMask.sizeDelta.y, _contentSizeDeltaY, _lerpCoeff));
         yield return(null);
     }
     _lerpCoeff = 0f;
     DisappearingFinished?.Invoke();
     _triggeringCoroutine = null;
 }
示例#2
0
 private IEnumerator TriggerDisappearingCoroutine()
 {
     _panel.sizeDelta = new Vector2(_panel.sizeDelta.x, _panel.sizeDelta.y);
     while (_lerpCoeff > 0f)
     {
         _lerpCoeff      -= _appearingRate * Time.unscaledDeltaTime;
         _panel.sizeDelta = new Vector2(_panel.sizeDelta.x, Mathf.Lerp(0, _windowSize.y, _lerpCoeff));
         yield return(null);
     }
     _lerpCoeff = 0f;
     DisappearingFinished?.Invoke();
     _triggeringCoroutine = null;
 }