64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System.Collections;
|
|
using Games.Item;
|
|
using GCGame.Table;
|
|
using Games.ChatHistory;
|
|
using GCGame;
|
|
using Games.GlobeDefine;
|
|
using Module.Log;
|
|
|
|
public class CommunityOtherPlayerInfo
|
|
{
|
|
public int Profession;
|
|
public string HeadIconName;
|
|
public string Name;
|
|
public ulong GUID;
|
|
public int Level;
|
|
}
|
|
|
|
public class CommunityPlayerInfoItem : CommunityPlayerBaseItem
|
|
{
|
|
|
|
private CommunityOtherPlayerInfo _PlayerInfo;
|
|
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
base.Show(hash);
|
|
|
|
CommunityOtherPlayerInfo playerInfo = (CommunityOtherPlayerInfo)hash["InitObj"];
|
|
ShowOtherPlayer(playerInfo);
|
|
}
|
|
|
|
public virtual void ShowOtherPlayer(CommunityOtherPlayerInfo playerInfo)
|
|
{
|
|
_PlayerInfo = playerInfo;
|
|
|
|
if (_Icon.isActiveAndEnabled)
|
|
{
|
|
if (!string.IsNullOrEmpty(playerInfo.HeadIconName))
|
|
{
|
|
_Icon.SetNetImage(Community.Instance.GetHeadIconDownUrl(playerInfo.HeadIconName), playerInfo.GUID);
|
|
}
|
|
else
|
|
{
|
|
_Icon.NetImageUrl = "";
|
|
_Icon._ImageChecking.gameObject.SetActive(false);
|
|
LoadAssetBundle.Instance.SetImageSprite(_Icon._Image, Utils.GetProfessionSpriteName(playerInfo.Profession));
|
|
}
|
|
}
|
|
//LoadAssetBundle.Instance.SetImageSprite(_Icon, Utils.GetProfessionIconName((CharacterDefine.PROFESSION)_PlayerInfo.Profession));
|
|
_GUID = _PlayerInfo.GUID;
|
|
_Name.text = _PlayerInfo.Name;
|
|
_Level.text = _PlayerInfo.Level.ToString();
|
|
_LevelValue = _PlayerInfo.Level;
|
|
_Profession = playerInfo.Profession;
|
|
}
|
|
|
|
public void OnBtnViewBlog()
|
|
{
|
|
LogModule.DebugLog("View blog:" + _PlayerInfo.Name + _PlayerInfo.GUID);
|
|
CommunityLogic.ShowPlayerCommunityRoot(_PlayerInfo.GUID, _PlayerInfo.Level, _PlayerInfo.Name);
|
|
}
|
|
}
|