void LateUpdate() { if (isLerping) { LerpToElement(); if (ShouldStopLerping()) { isLerping = false; canvasView.blocksRaycasts = true; onLerpComplete.Invoke(); onLerpComplete.RemoveListener(WrapElementAround); } } }
private void LateUpdate() { if (!_isLerping) { return; } LerpToElement(); if (!ShouldStopLerping()) { return; } _isLerping = false; _canvasGroup.blocksRaycasts = true; onLerpComplete.Invoke(); onLerpComplete.RemoveListener(WrapElementAround); }