Beispiel #1
0
    private IEnumerator ShowResults()
    {
        ScoreQuery query = new ScoreQuery();

        query.username = nameInput.text;
        query.score    = score.CurrentScore;
        query.invscore = -score.CurrentScore;
        query.guid     = FirebaseManager.Instance.UserGuid;
        rankingManager.SendScoreAndGetRanking(query);


        ChangeVisibility(resultsCanvasGroup, true);
        durationText.text = "-" + score.HighestScoreTime.ToString("F1");
        heightText.text   = score.HighestScore.ToString("F1");

        yield return(new WaitForSeconds(fadeDuration));

        ChangeVisibility(durationCanvasGroup, true);

        yield return(new WaitForSeconds(fadeDuration * 2));

        ChangeVisibility(heightCanvasGroup, true);

        yield return(new WaitForSeconds(fadeDuration * 6));

        ChangeVisibility(resultsCanvasGroup, false);
        ShowRankings();
    }