예제 #1
0
 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));
     }
 }
예제 #2
0
        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();
            }
        }