80 lines
1.7 KiB
C#
80 lines
1.7 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2020-09-19
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "TemplateItem" company="KUNPO"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
|
|||
|
using TMPro;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
namespace G.UI
|
|||
|
{
|
|||
|
partial class QuickBox
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
private class TemplateItem : KUIWidget
|
|||
|
{
|
|||
|
#region Field
|
|||
|
|
|||
|
#pragma warning disable CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|||
|
[KUIFlag]
|
|||
|
GameObject _goEquipmentItem2;
|
|||
|
[KUIFlag]
|
|||
|
Button _btnClose;
|
|||
|
[KUIFlag]
|
|||
|
Button _btnFunc;
|
|||
|
#pragma warning restore CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|||
|
|
|||
|
EquipmentWidget _equipmentItem;
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
public override void Refresh()
|
|||
|
{
|
|||
|
if (this.data is EntityItemEquipment)
|
|||
|
{
|
|||
|
_equipmentItem.SetData(this.data);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void OnCloseBtnClick()
|
|||
|
{
|
|||
|
_Instance.OnTemplateClose(this);
|
|||
|
}
|
|||
|
|
|||
|
private void OnFuncBtnClick()
|
|||
|
{
|
|||
|
_Instance.OnTemplateFunc(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Unity
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
SetViewData();
|
|||
|
_equipmentItem = _goEquipmentItem2.AddComponent<EquipmentWidget>();
|
|||
|
_btnClose.onClick.AddListener(this.OnCloseBtnClick);
|
|||
|
_btnFunc.onClick.AddListener(this.OnFuncBtnClick);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|
|||
|
}
|