34 lines
986 B
C#
34 lines
986 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using GCGame.Table;
|
|
|
|
public class SegmentDescItem : UIItemBase {
|
|
|
|
private int _SegmentGrade = 1;
|
|
|
|
public Text _SegmentDesc;
|
|
public Image _SegmentIcon;
|
|
public RectTransform _BGRec;
|
|
|
|
private const int _perAddpix = 12;
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
base.Show(hash);
|
|
_SegmentGrade = (int)hash["InitObj"];
|
|
|
|
//82101
|
|
_BGRec.sizeDelta = new Vector2(_BGRec.sizeDelta.x, _BGRec.sizeDelta.y + 12 * (_SegmentGrade - 1));
|
|
_SegmentDesc.text = GameManager.gameManager.PlayerDataPool.pvpIfo.GetSegmentGradeDesc(_SegmentGrade);
|
|
foreach(var tab in TableManager.GetHonorBattlefieldSegment().Values)
|
|
{
|
|
if(_SegmentGrade == tab.Segment)
|
|
{
|
|
LoadAssetBundle.Instance.SetImageSprite(_SegmentIcon, tab.SegmentIcon);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|