123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "FaBaoAttributeWidget")]
- public partial class FaBaoAttributeWidget : UIComponent
- {
- private void Init()
- {
- }
- public override void AddEvent()
- {
- }
- public override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- }
- public void CusomtInit(int type,long value)
- {
- Text_AttributeName.text = GetAttributeName(type);
- Text_AttributeValue.text = value.ToString();
- }
- private string GetAttributeName(int type)
- {
- switch (type)
- {
- case 1:
- return "生命";
-
- case 2:
- return "防御";
- case 3:
- return "攻击";
- }
- return "";
- }
- }
- }
|