26 lines
907 B
C#
26 lines
907 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class PvpBothInfoItem : UIItemBase {
|
|
|
|
public Text _RoleName;
|
|
public Text _SegmentDesc;
|
|
public Text _CombatVal;
|
|
public Image _RoleHeadIcon;
|
|
|
|
public void InitItem(HonorBattlefieldBattlePlayerInfo info)
|
|
{
|
|
if(!_RoleName.text.Equals(info.Name)) //Mesh Rebuild
|
|
_RoleName.text = info.Name;
|
|
var segmentDesc = GameManager.gameManager.PlayerDataPool.pvpIfo.GetSegmentLevelDesc(info.Segment);
|
|
if(!_SegmentDesc.text.Equals(segmentDesc))
|
|
_SegmentDesc.text = segmentDesc;
|
|
if (!_CombatVal.text.Equals(info.Power.ToString()))
|
|
_CombatVal.text = info.Power.ToString();
|
|
_RoleHeadIcon.overrideSprite = PvpBothInfoPanel.Instance._PvpHeadIconList[info.Job];
|
|
_RoleHeadIcon.gameObject.SetActive(true);
|
|
}
|
|
}
|