调用类的方法
using UnityEngine; using System.Collections; using System; using SimpleJson; public class FriendRecommendSingleView : MonoBehaviour { /// <summary> /// 玩家名称 /// </summary> public UILabel _name_label; /// <summary> /// 上次登录时间 /// </summary> public UILabel _login_time_label; /// <summary> /// 玩家等级 /// </summary> public UILabel _lv_label; /// <summary> /// Vip等级 /// </summary> public UILabel _vip_lv_label; /// <summary> /// 添加按钮 /// </summary> public GameObject _add_btn; /// <summary> /// 添加按钮上显示内容 /// </summary> public UILabel _add_btn_label; #endregion /// <summary> /// 玩家数据 /// </summary> private FriendItem _role_data; //好友推荐职业头像 public DisplayProfessionHead _friend_recommend_profession_head; /// <summary> /// 玩家数据 /// </summary> public FriendItem RoleData { get { return _role_data; } set { _role_data = value; } } /// <summary> /// 刷新推荐好友界面 /// </summary> /// <param name="data"></param> public void RefreshRecommendSingleView(FriendItem data) { if (data == null) { Debug.Log("传入的好友数据为空"); return; } this.RoleData = data; SetName(data.Name); SetLoginTime(data.LoginTime); SetLv(data.Level); SetVipLv(data.VipLevel); SetBtnCanAdd(); } #region UI设置函数 ///好友要求头像显示 public void SetRecommendProfessionHead(FriendItem data) { this._friend_recommend_profession_head.RefreshProfessionHead(data.Career); }
posted on 2015-08-14 20:54 public_void_digua 阅读(745) 评论(0) 收藏 举报
浙公网安备 33010602011771号