public void setAvatarVo(PlayerBackVO value)
 {
     if (value != null)
     {
         avatarvo       = value;
         nameText.text  = avatarvo.accountName;
         scoreText.text = avatarvo.socre + "";
         Sprite tempSp;
         if (string.IsNullOrEmpty(avatarvo.headIcon) == false)
         {
             if (GlobalDataScript.imageMap.TryGetValue(avatarvo.headIcon, out tempSp))
             {
                 headerIcon.sprite = tempSp;
             }
             else
             {
                 StartCoroutine(LoadImg());
             }
         }
     }
     else
     {
         nameText.text     = "";
         readyImg.enabled  = false;
         bankerImg.enabled = false;
         headerIcon.sprite = Resources.Load("Image/default_icon", typeof(Sprite)) as Sprite;
     }
 }
Exemplo n.º 2
0
 void initall()
 {
     for (int i = 0; i < aa.playerItems.Count; i++)
     {
         PlayerBackVO player = aa.playerItems [i];
         playerItems [i].setAvatarVo(player);
     }
 }
Exemplo n.º 3
0
 void initall()
 {
     for (int i = 0; i < gamePlayResponseVo.playerItems.Count; i++)
     {
         PlayerBackVO player = gamePlayResponseVo.playerItems [i];
         playerItems [i].setAvatarVo(player);
     }
     int indexCount = 0;
 }
Exemplo n.º 4
0
 public void setAvatarVo(PlayerBackVO value)
 {
     if (value != null)
     {
         avatarvo       = value;
         nameText.text  = avatarvo.accountName;
         scoreText.text = avatarvo.socre + "";
         StartCoroutine(LoadImg());
     }
     else
     {
         nameText.text     = "";
         readyImg.enabled  = false;
         bankerImg.enabled = false;
         headerIcon.sprite = Resources.Load("Image/morentouxiang", typeof(Sprite)) as Sprite;
     }
 }
Exemplo n.º 5
0
    public void SetAvatarVo(PlayerBackVO value)
    {
        if (value != null)
        {
            avatarvo       = value;
            nameText.text  = avatarvo.accountName;
            scoreText.text = avatarvo.socre.ToString();
            StartCoroutine(LoadImg());
        }
        else
        {
            nameText.text     = "";
            readyImg.enabled  = false;
            bankerImg.enabled = false;

            ResourcesLoader.Load <Sprite>("Image/morentouxiang", (sprite) => {
                headerIcon.overrideSprite = sprite;
            });

            // headerIcon.overrideSprite = Resources.Load("Image/morentouxiang", typeof(Sprite)) as Sprite;
        }
    }