Esempio n. 1
0
 public void Init(UsersManager.UserData data, System.Action <UserButton> _OnClicked)
 {
     OnClicked  = _OnClicked;
     this.data  = data;
     field.text = data.username;
     LoopUntilReady();
 }
Esempio n. 2
0
    void AddButton(int id, UsersManager.UserData data)
    {
        UserButton b = Instantiate(button);

        b.transform.SetParent(container);
        b.Init(data, OnClicked);
        b.transform.localScale = Vector3.one;
    }
Esempio n. 3
0
 void LoadImage(Image image, UsersManager.UserData data)
 {
     if (data.texture != null)
     {
         Sprite newSprite = Sprite.Create(data.texture, new Rect(0, 0, data.texture.width, data.texture.height), Vector2.zero);
         if (newSprite != null)
         {
             image.sprite = newSprite;
         }
     }
     else
     {
         Invoke("LoadData", 1);
     }
 }