Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        returnButton.gameObject.SetActive(true);
        game       = new GamesPlayed();
        helper     = (HelperScript)FindObjectOfType(typeof(HelperScript));
        httpServer = helper.GetHttpServer();
        player     = helper.GetPlayer();
        StartCoroutine(LoadImage(player.BlobUri, avatar));
        game.playerId     = player.Id;
        nicknameText.text = player.NickName;
        switch (player.TotalScore)
        {
        case int n when(n < 50):
            StartCoroutine(LoadImage(medals[0], lvl));

            break;

        case int n when(n > 49 && n < 500):
            StartCoroutine(LoadImage(medals[1], lvl));

            break;

        case int n when(n > 499):
            StartCoroutine(LoadImage(medals[2], lvl));

            break;
        }
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        gameManager = (HelperScript)FindObjectOfType(typeof(HelperScript));
        httpServer  = gameManager.GetHttpServer();
        player      = gameManager.GetPlayer();
        StartCoroutine(LoadImage(player.BlobUri));
        nickname.text = player.NickName;
        UpdateState("1", player.Id);
        GetGame();

        foreach (GamesPlayed g in games.games)
        {
            scores.text = scores.text + "\n" + g.playerId.Substring(0, 3) + " || " + g.dateStarted + " || " + g.dateEnded + " || " + g.difficult + " || " + g.score;
        }
    }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     gameManager = (HelperScript)FindObjectOfType(typeof(HelperScript));
     httpServer  = gameManager.GetHttpServer();
     player      = gameManager.GetPlayer();
     GetGame();
     firstName.text = player.FirstName;
     lastName.text  = player.LastName;
     nickName.text  = player.NickName;
     city.text      = player.City;
     birthDate.text = player.BirthDate;
     foreach (GamesPlayed g in games.games)
     {
         gamesPlayed.text = gamesPlayed.text + "\n" + g.playerId.Substring(0, 3) + " || " + g.dateStarted + " || " + g.dateEnded + " || " + g.difficult + " || " + g.score;
     }
 }