Esempio n. 1
0
    IEnumerator UpdateHitFeedbackScreenCoroutine(string type)
    {
        int currentNumHit = 0;

        while (currentNumHit != levelStatsData.GetLevelStats(type))
        {
            if (type != "score")
            {
                currentNumHit++;
            }
            else
            {
                if (currentNumHit < levelStatsData.GetLevelStats(type))
                {
                    currentNumHit += 1000;
                }
                else
                {
                    currentNumHit--;
                }
            }
            switch (type)
            {
            case "miss":
                feedbackWindowHitCounters[0].text = currentNumHit.ToString();
                break;

            case "slow":
                feedbackWindowHitCounters[1].text = currentNumHit.ToString();
                break;

            case "fast":
                feedbackWindowHitCounters[2].text = currentNumHit.ToString();
                break;

            case "good":
                feedbackWindowHitCounters[3].text = currentNumHit.ToString();
                break;

            case "exc":
                feedbackWindowHitCounters[4].text = currentNumHit.ToString();
                break;

            case "score":
                feedbackWindowScoreCounters[0].text = currentNumHit.ToString();
                break;

            case "chain":
                feedbackWindowScoreCounters[1].text = currentNumHit.ToString();
                break;

            default:
                Debug.Log(type + " not defined");
                break;
            }

            yield return(null);
        }
    }