public void Init(GameObject objRoot) { m_gridView = objRoot.gameObject.GetComponent <UIGridView>(); if (m_gridView == null) { m_gridView = objRoot.gameObject.AddComponent <UIGridView>(); } m_gridView.Init(); m_gridView.DataSource = this; m_gridView.ViewCellDelegate = this; }
public void Init(GameObject objRoot) { m_equipPart = (EquipPart)Player.Instance.GetPart(emPartType.emPart_Equip); m_gridView = objRoot.gameObject.GetComponent <UIGridView>(); if (m_gridView == null) { m_gridView = objRoot.gameObject.AddComponent <UIGridView>(); } m_gridView.Init(); m_gridView.DataSource = this; m_gridView.ViewDelegate = this; }