Esempio n. 1
0
 public void SetData(JFriend json)
 {
     if (json.on_friend_block || json.on_friend_block_me)
     {
         MessageManager.instance.Show(this.gameObject, "Tidak bisa menampilkan karena anda berada di daftar blok pemain ini");
         return;
     }
     jFriend               = json;
     txtDisplayName.text   = json.display_name;
     txtStatus.text        = json.status_message;
     txtLevel.text         = json.level.ToString();
     txtCoinValue.text     = long.Parse(json.coin).toShortCurrency();
     txtCouponValue.text   = long.Parse(json.coupon).toCouponShortCurrency();
     txtTag.text           = "Tag: " + json.player_tag;
     fillExpBar.fillAmount = float.Parse(json.exp_percentage);
     standHero.LoadFromBundle(json.costume_equiped);
     if (json.on_friend_list)
     {
         btnAdd.gameObject.SetActive(false);
         btnRemove.gameObject.SetActive(true);
         btnBlock.gameObject.SetActive(true);
     }
     else
     {
         btnAdd.gameObject.SetActive(true);
         btnRemove.gameObject.SetActive(false);
         btnBlock.gameObject.SetActive(false);
     }
     Show();
 }
Esempio n. 2
0
    public void AddAcceptedFriend(JFriend json)
    {
        ItemFriendList ifl = Instantiate(prefabItemFriendList, parentFriendList);

        ifl.SetData(json);
        itemListFriends.Add(ifl);
    }
Esempio n. 3
0
 public void SetData(JFriend json)
 {
     jFriend = json;
     if (json.display_name.Length > 10)
     {
         json.display_name = json.display_name.Substring(0, 7) + "...";
     }
     txtDisplayName.text = json.display_name;
     txtStatus.text      = json.status_message;
     txtLevel.text       = "Lv. " + json.level;
 }
Esempio n. 4
0
 public void SetData(JFriend json)
 {
     jFriend = json;
     if (json.display_name.Length > 10)
     {
         json.display_name = json.display_name.Substring(0, 7) + "...";
     }
     txtDisplayName.text = json.display_name;
     txtStatus.text      = json.status_message;
     txtLevel.text       = "Lv. " + json.level;
     tmpCoinValue.text   = long.Parse(json.coin).toShortCurrency();
 }