コード例 #1
0
ファイル: ArrowPrompt.cs プロジェクト: linuslc/Phobophobia
        /**
         * <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;
            }
        }
コード例 #2
0
ファイル: ArrowPrompt.cs プロジェクト: linuslc/Phobophobia
        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;
            }
        }
コード例 #3
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;

        }
    }
コード例 #4
0
    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;
        }
    }