Files
JJBB/Assets/Project/Script/GUI/Role/TitleViewPropItem.cs

33 lines
805 B
C#
Raw Permalink Normal View History

2024-08-23 15:49:34 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using GCGame.Table;
public struct TitleViewPropItemStruct
{
public int _PropId;
public int _PropValue;
public TitleViewPropItemStruct(int propId, int propValue)
{
_PropId = propId;
_PropValue = propValue;
}
}
public class TitleViewPropItem : UIItemBase {
public Text _PropName;
public Text _PropValue;
public override void Show(Hashtable hash)
{
base.Show(hash);
var info = (TitleViewPropItemStruct)hash["InitObj"];
var propStrId = "#{" + (10000 + info._PropId) + "}";
_PropName.text = StrDictionary.GetClientDictionaryString(propStrId) + ":";
_PropValue.text = "+" + info._PropValue.ToString();
}
}