using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public enum ItemCellformat { Format_120x120, Format_100x100, Format_84x84, Format_80x80, Format_70x70, Format_64x64, None, } public class CommonItemBaisc : MonoBehaviour { [SerializeField] ItemCellformat m_Format; public ItemCellformat format { get { return m_Format; } set { m_Format = value; } } Image m_BgIcon; private Image bgIcon { get { if (m_BgIcon == null) { m_BgIcon = this.transform.GetComponent("Container_ItemCell/Img_BackGround"); } return m_BgIcon; } } Image m_ItemIcon; private Image itemIcon { get { if (m_ItemIcon == null) { m_ItemIcon = this.transform.GetComponent("Container_ItemCell/Img_Icon"); } return m_ItemIcon; } } Image m_StateIcon; public Image stateIcon { get { if (m_StateIcon == null) { m_StateIcon = this.transform.GetComponent("Container_ItemCell/Img_State"); } return m_StateIcon; } } Text m_CountText; public Text countText { get { if (m_CountText == null) { m_CountText = this.transform.GetComponent("Container_ItemCell/Txt_Count"); } return m_CountText; } } Image m_CountryIcon; public Image countryIcon { get { if (m_CountryIcon == null) { m_CountryIcon = this.transform.GetComponent("Container_ItemCell/Img_Country"); } return m_CountryIcon; } } Image m_PieceIcon; public Image pieceIcon { get { if (m_PieceIcon == null) { m_PieceIcon = this.transform.GetComponent("Container_ItemCell/Img_Piece"); } return m_PieceIcon; } } Transform m_TimeForm; public Transform timeForm { get { if (m_TimeForm == null) { m_TimeForm = this.transform.Find("Container_ItemCell/Bg_Time"); } return m_TimeForm; } } Text m_TimeText; public Text timeText { get { if (m_TimeText == null) { m_TimeText = this.transform.GetComponent("Container_ItemCell/Bg_Time/Txt_Time"); } return m_TimeText; } } Button m_Button; public Button button { get { if (m_Button == null) { m_Button = this.GetComponent