27 lines
662 B
C#
27 lines
662 B
C#
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
|
|
|
using UnityEngine;
|
|
using FairyGUI;
|
|
using NBC;
|
|
using NBF.Utils;
|
|
|
|
namespace NBF
|
|
{
|
|
public partial class BagItem : GButton
|
|
{
|
|
public ItemInfo ItemInfo;
|
|
|
|
private void OnInited()
|
|
{
|
|
}
|
|
|
|
public virtual void SetData(ItemInfo itemInfo)
|
|
{
|
|
ItemInfo = itemInfo;
|
|
title = itemInfo.ConfigId.GetName();
|
|
this.SetIcon(itemInfo.ConfigId);
|
|
Quality.SetQuality(ItemInfo.Config.Quality);
|
|
this.SetTitleQuality(ItemInfo.Config.Quality);
|
|
}
|
|
}
|
|
} |