public void Portion(LerpData ld) { if (IsLerpInitialized() && mode != Mode.FPS) { _positionLerp.Portion(ld); _rotationLerp.Portion(ld); _heightLerp.Portion(ld); } }
public void Portion(LerpData ld) { lerpsFinished &= !_mouseDown; includedInLerp = (gameObject.activeSelf && !lerpsFinished && this != _dragging); if (!includedInLerp) { return; } var ac = ActiveConfig; if (LerpPosition) { if (!isFading || !_fadingRelation) { _localPos.targetValue = ac.targetLocalPosition; } else if (!_fadingIntoParent) { _localPos.targetValue = _fadingRelation.transform.localPosition + (transform.localPosition - _fadingRelation.transform.localPosition) .normalized * 50; } else { _localPos.targetValue = _fadingRelation.transform.localPosition; } _localPos.Portion(ld); } _localScale.Portion(ld, isFading ? Vector3.one : ac.targetSize); _textColor.Portion(ld, ac.targetTextColor); if (16f.SpeedToMinPortion(ac.targetColor.DistanceRgb(bgColor), ld)) { dominantParameter = "Box Bttn BG Color"; } if (4f.SpeedToMinPortion(fadePortion - (isFading ? 0f : 1f), ld)) { dominantParameter = "Box Button Fade"; } if (8f.SpeedToMinPortion(1 - _activeTextAlpha, ld)) { dominantParameter = "Box Button Text Alpha"; } _textureFadeIn.Portion(ld, _coverImage ? 1 : 0); _shadeCorners.Portion(ld, (this == _dragging) ? 0 : (_mouseDown ? 0.1f : ((source == Shortcuts.CurrentNode) ? 0.4f : 0.9f))); _shadeSelected.Portion(ld, (this == BoxButtons.inst.selectedNode ? 1f : 0f)); _texTransition.Portion(ld); if (LevelArea) { LevelArea.Portion(ld); } }