コード例 #1
0
ファイル: GameManager.cs プロジェクト: Shaun-Anderson/Loop
    IEnumerator DisplayTutorial()
    {
        Debug.Log(UIManager.tutorialPanel.localPosition + "  ||  " + UIManager.tutorialPanel.anchoredPosition);
        yield return(new WaitForSeconds(1));

        yield return(StartCoroutine(UIAnimation.MoveRect(UIManager.tutorialPanel, new Vector3(UIManager.tutorialPanel.transform.localPosition.x, 0), 20000 * Time.deltaTime)));

        yield return(new WaitForSeconds(3));

        yield return(StartCoroutine(UIAnimation.MoveRect(UIManager.tutorialPanel, new Vector3(UIManager.tutorialPanel.transform.localPosition.x, 300), 20000 * Time.deltaTime)));

        yield break;
    }
コード例 #2
0
ファイル: GameManager.cs プロジェクト: Shaun-Anderson/Loop
    public IEnumerator StartAnimation()
    {
        foreach (RectTransform rect in UIManager.bottomButtons)
        {
            StartCoroutine(UIAnimation.MoveRect(rect, new Vector2(rect.anchoredPosition.x, 0), 1000));
            yield return(new WaitForSeconds(0.1f));
        }

        yield return(StartCoroutine(UIAnimation.Fade(UIManager.ChallengeParent, 0, 1, 2)));

        foreach (CanvasGroup g in UIManager.challengeTransform)
        {
            switch (g.name)
            {
            case "GemChallenges":
                if (saveData.curGemChallenge < instance.gemChallenges.Length)
                {
                    StartCoroutine(UIAnimation.Fade(g, 0, 1, 2));
                }
                break;

            case "DistanceChallenges":
                if (saveData.curDistanceChallenge < instance.distanceChallenges.Length)
                {
                    StartCoroutine(UIAnimation.Fade(g, 0, 1, 2));
                }
                break;
            }
            yield return(new WaitForSeconds(0.5f));
        }

        if (gemChallengeComplete)
        {
            StartCoroutine(GemChallengeComplete());
        }

        if (distanceChallengeComplete)
        {
            StartCoroutine(DistanceChallengeComplete());
        }
        yield break;
    }