public override LTDescr ExecuteTween() { return(LeanTweenHelpers.ShakeScale( _targetObject.Value.transform, _axisScale.Value, _axisSpeedRange.Value, _duration.Value)); }
protected virtual void Punch(Vector3 axis, float time) { GameObject go = punchObject; if (go == null) { go = Camera.main.gameObject; } if (go != null) { LeanTweenHelpers.ShakePosition(go.transform, axis, new Vector2(30, 60), time); } }
public override LTDescr ExecuteTween() { if (isLocal) { return(LeanTweenHelpers.ShakePositionLocal( _targetObject.Value.transform, _axisScale.Value, _axisSpeedRange.Value, _duration.Value)); } else { return(LeanTweenHelpers.ShakePosition( _targetObject.Value.transform, _axisScale.Value, _axisSpeedRange.Value, _duration.Value)); } }
public override void OnEnter() { var targetTransform = Camera.main.transform; if (stopPreviousTweens) { LeanTween.cancel(targetTransform.gameObject); } if (isLocal) { ourTween = LeanTweenHelpers.ShakePositionLocal( targetTransform, _axisScale.Value, _axisSpeedRange.Value, _duration.Value); } else { ourTween = LeanTweenHelpers.ShakePosition( targetTransform, _axisScale.Value, _axisSpeedRange.Value, _duration.Value); } ourTween.setEase(easeType); if (waitUntilFinished) { if (ourTween != null) { ourTween.setOnComplete(OnTweenComplete); } } else { Continue(); } }