Exemplo n.º 1
0
 private void RefeshStateUI()
 {
     Log("RefeshStateUI");
     Log("Is Logged ?");
     if (leaderboard.IsLogged())
     {
         Log("Yes");
         leftNotLogged.gameObject.SetActive(false);
         leftLogged.gameObject.SetActive(true);
         leftLogged_score.text = leaderboard.GetLocalBestScore().ToString();
         ImageHelper.LoadImage(leaderboard.GetSelfPlayer().AvatarUrl, r => {
             if (r.ErrorCode == 0)
             {
                 leftLogged_avatar.sprite = Sprite.Create(r.texture, new Rect(0, 0, r.texture.width, r.texture.height), new Vector2(0, 0));
             }
         });
     }
     else
     {
         Log("No");
         leftNotLogged.gameObject.SetActive(true);
         leftLogged.gameObject.SetActive(false);
         leftNotLogged_score.text = leaderboard.GetLocalBestScore().ToString();
     }
 }