/// <summary> /// /// </summary> private void Update() { if (!_paused) { if (!IsPvp()) { XCameraUpdater.Update(false, _resetTwoPosX); float theDistance = (XCameraUpdater.sourcePosition - XCameraUpdater.targetPosition).magnitude; if (theDistance > _beginResetTwoPosX) { _shouldResetTwoPos = true; theDistance = _resetTwoPosX; } else { _shouldResetTwoPos = false; } if (_inMaxCameraDistanceMod == false) { if (theDistance > _beginMaxDistanceModValue) { AddModifierForCharge(2, "modMaxDistance", 1, 0); _inMaxCameraDistanceMod = true; } } else { if (theDistance < _endMaxDistanceModValue) { RemoveModifier("modMaxDistance"); _inMaxCameraDistanceMod = false; } } if (_inMinCameraDistanceMod == false) { if (theDistance < _beginMinDistanceModValue) { AddModifierForCharge(3, "modMinDistance", 1, 0); _inMinCameraDistanceMod = true; } } else { if (theDistance > _endMinDistanceModValue) { RemoveModifier("modMinDistance"); _inMinCameraDistanceMod = false; } } } } }
/// <summary> /// /// </summary> private void LateUpdate() { if (!_paused) { XCameraUpdater.followMaxHeight = _followMaxHeight; XCameraUpdater.followMinHeight = _followMinHeight; // update camera XCameraUpdater.offsetFocus = _offsetFocus; XCameraUpdater.Update(_shouldResetTwoPos, _resetTwoPosX); LazyOrbitUpdate(_force); } }