コード例 #1
0
        /// <summary>
        /// Coroutine that plays the animation to show the mouse
        /// </summary>
        /// <returns></returns>
        private IEnumerator PlayShowAnimation()
        {
            Animating = true;
            StartCoroutine(TransformTweens.ToScale(_cursor, _onAnimationParameters.CursorTargetScale, 1 / _onAnimationParameters.CursorScaleDuration, _onAnimationParameters.CursorScaleAnimationCurve.Curve, null));
            yield return(StartCoroutine(ShowText(_onAnimationParameters)));

            Animating = false;
        }
コード例 #2
0
        /// <summary>
        /// Coroutine that plays the highlight animation to show the mouse
        /// </summary>
        /// <returns></returns>
        private IEnumerator PlayHighlightAnimation()
        {
            Animating = true;
            Vector3 currentScale = _cursor.localScale;

            yield return(StartCoroutine(TransformTweens.ToScale(_cursor, _highlightParameters.CursorTargetScale, 1 / _highlightParameters.CursorScaleDuration, _onAnimationParameters.CursorScaleAnimationCurve.Curve, null)));

            yield return(new WaitForSeconds(_highlightParameters.TextStayDuration));

            yield return(StartCoroutine(TransformTweens.ToScale(_cursor, currentScale, 1 / _highlightParameters.CursorScaleDuration, _onAnimationParameters.CursorScaleAnimationCurve.Curve, null)));

            Animating = false;
        }
コード例 #3
0
        /// <summary>
        /// Coroutine that plays the animation to hide the mouse
        /// </summary>
        /// <returns></returns>
        private IEnumerator PlayHideAnimation()
        {
            yield return(StartCoroutine(ShowText(_offAnimationParameters)));

            StartCoroutine(TransformTweens.ToScale(_cursor, _hideScale, 1 / _offAnimationParameters.CursorScaleDuration, _offAnimationParameters.CursorScaleAnimationCurve.Curve, null));
        }
コード例 #4
0
 /// <summary>
 /// Coroutine that plays the animation to show the mouse
 /// </summary>
 /// <returns></returns>
 private IEnumerator PlayShowAnimation()
 {
     StartCoroutine(TransformTweens.ToScale(_cursor, _regularCursorScale, 1 / _onAnimationParameters.CursorScaleDuration, _onAnimationParameters.CursorScaleAnimationCurve.Curve, null));
     yield return(StartCoroutine(ShowText(_onAnimationParameters)));
 }