示例#1
0
 public override LTDescr ExecuteTween()
 {
     return(LeanTweenHelpers.ShakeScale(
                _targetObject.Value.transform,
                _axisScale.Value,
                _axisSpeedRange.Value,
                _duration.Value));
 }
示例#2
0
        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);
            }
        }
示例#3
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));
     }
 }
示例#4
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();
            }
        }