Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        windowShowCD.Run();
        //if (!windowShowCD.done)
        //{
        //    grade.transform.localScale = Vector3.MoveTowards(grade.transform.localScale, new Vector3(1.5f,1.5f,1.5f),10 * Time.deltaTime);
        //}
        //if (windowShowCD.done)
        //{
        //    grade.transform.position = Vector3.MoveTowards(grade.transform.position,gradeFinalPosition.position, 750 * Time.deltaTime);
        //    grade.transform.localScale = Vector3.MoveTowards(grade.transform.localScale, gradeFinalPosition.localScale,3 * Time.deltaTime);
        //}
        //if (grade.transform.position == gradeFinalPosition.position)
        //{
        //    WindowVisibility(true);
        //    window.transform.localScale = Vector3.MoveTowards(window.transform.localScale, new Vector3(1, 1, 1), 7 * Time.deltaTime);
        //}
        //if (window.transform.localScale == new Vector3(1, 1, 1) && !showStats)
        //{
        //    StartCoroutine(ShowStats());
        //    showStats = true;
        //}
        //if (runCorrectAnim)
        //{
        //    cardsCorrect.transform.localScale = Vector3.MoveTowards(cardsCorrect.transform.localScale, new Vector3(1, 1, 1), 20 * Time.deltaTime);
        //}
        //if (runStreakAnim)
        //{
        //    longestStreak.transform.localScale = Vector3.MoveTowards(longestStreak.transform.localScale, new Vector3(1, 1, 1), 20 * Time.deltaTime);
        //}
        //if (runTimeAnim)
        //{
        //    time.transform.localScale = Vector3.MoveTowards(time.transform.localScale, new Vector3(1, 1, 1), 20 * Time.deltaTime);
        //}
        if (waitTimer > 0)
        {
            waitTimer -= Time.deltaTime;
        }


        if (windowShowCD.done && !coverAnimationPlayed)
        {
            CAnimation.PlaySpriteSheet(cover, "CoverFlip", 1, false);
            coverAnimationPlayed = true;
        }
        if (CAnimation.SpriteSheetDone(cover, "CoverFlip") && !gradeTW.Done() && waitTimer <= 0)
        {
            grade.text = gradeTW.Run();
            if (gradeTW.Done())
            {
                waitTimer = 0.3f;
            }
        }
        if (gradeTW.Done() && !correctTW.Done() && waitTimer <= 0)
        {
            cardsCorrect.text = correctTW.Run();
            if (correctTW.Done())
            {
                waitTimer = 0.3f;
            }
        }
        if (correctTW.Done() && !streakTW.Done() && waitTimer <= 0)
        {
            longestStreak.text = streakTW.Run();
            if (streakTW.Done())
            {
                waitTimer = 0.3f;
            }
        }
        if (streakTW.Done() && !timeTW.Done() && waitTimer <= 0)
        {
            time.text = timeTW.Run();
            if (timeTW.Done())
            {
                waitTimer = 0.3f;
            }
        }
        if (timeTW.Done() && waitTimer <= 0)
        {
            returnButton.gameObject.SetActive(true);
        }
    }