Beispiel #1
0
        /**
         * <summary>Enables the ArrowPrompt.</summary>
         */
        public void TurnOn()
        {
            if (upArrow.isPresent || downArrow.isPresent || leftArrow.isPresent || rightArrow.isPresent)
            {
                if (KickStarter.playerInput)
                {
                    KickStarter.playerInput.activeArrows = this;
                }

                StartCoroutine("FadeIn");
                directionToAnimate = AC_Direction.None;
                arrowSize          = 0.05f;
            }
        }
Beispiel #2
0
        private IEnumerator FadeOut(AC_Direction direction)
        {
            arrowSize          = 0.05f;
            alpha              = 1f;
            directionToAnimate = direction;

            if (alpha > 0f)
            {
                while (alpha > 0.05f)
                {
                    arrowSize += 0.005f;

                    alpha -= 0.05f;
                    alpha  = Mathf.Clamp01(alpha);
                    yield return(new WaitForFixedUpdate());
                }
                alpha = 0f;
            }
        }
    private IEnumerator FadeOut(AC_Direction direction)
    {
        arrowSize = 0.05f;
        alpha = 1f;
        directionToAnimate = direction;

        if (alpha > 0f)
        {
            while (alpha > 0.05f)
            {
                arrowSize += 0.005f;

                alpha -= 0.05f;
                alpha = Mathf.Clamp01 (alpha);
                yield return new WaitForFixedUpdate();
            }
            alpha = 0f;

        }
    }
    public void TurnOn()
    {
        if (upArrow.isPresent || downArrow.isPresent || leftArrow.isPresent || rightArrow.isPresent)
        {
            if (playerInput)
            {
                playerInput.activeArrows = this;
            }

            StartCoroutine ("FadeIn");
            directionToAnimate = AC_Direction.None;
            arrowSize = 0.05f;
        }
    }