/// <summary> /// 点击阵型列表响应函数 /// </summary> /// <param name="objItem"></param> public void OnMatrixListItemClick(GameObject objItem) { if (null != m_curSelectMatrix) { m_curSelectMatrix.SetClickHighLight(false); } m_curSelectMatrix = objItem.GetComponent <BelleMatrixInfoItem>(); if (null != m_curSelectMatrix) { m_curSelectMatrix.SetClickHighLight(true); } ShowMatrixByItem(); }
/// <summary> /// 填充阵型列表 /// </summary> /// <param name="item"></param> public void FillMatrixList() { if (null == m_belleMatrixItem) { LogModule.ErrorLog("m_belleMatrixItem is not found!"); } for (int i = 0; i < TableManager.GetBelleMatrix().Count; i++) { Tab_BelleMatrix belleMatrixTab = TableManager.GetBelleMatrixByID(i, 0); if (null == belleMatrixTab) { continue; } GameObject curItem = Utils.BindObjToParent(m_belleMatrixItem, m_matrixGrid); if (curItem != null && curItem.GetComponent <BelleMatrixInfoItem>() != null) { curItem.GetComponent <BelleMatrixInfoItem>().SetData(this, i, belleMatrixTab); } } m_matrixGrid.GetComponent <UICabalGrid>().repositionNow = true; Transform curMatrix = m_matrixGrid.transform.FindChild("0"); if (null != curMatrix) { m_curSelectMatrix = curMatrix.GetComponent <BelleMatrixInfoItem>(); if (m_curSelectMatrix != null) { m_curSelectMatrix.SetClickHighLight(true); } ShowMatrixByItem(); } }