/// <summary> /// 根据模板编号和类型编号,返回模板分组管理脚本 /// </summary> /// <param name="pModeNumm"></param> /// <param name="pModelType"></param> /// <returns></returns> public ModelBtnGroupControl GetLeftGroupSc(int pModeNumm, int pModelType) { ModelBtnGroupControl resSc = null; for (int i = 0; i < LeftGroupControlScs.Length; i++) { if (LeftGroupControlScs[i].ModelType == pModeNumm) { resSc = LeftGroupControlScs[i]; //break; } LeftGroupControlScs[i].gameObject.SetActive(false); } return(resSc); }
/// <summary> /// 根据模板编号和类型编号,返回模板分组管理脚本 /// </summary> /// <param name="pModeNumm"></param> /// <param name="pModelType"></param> /// <returns></returns> public ModelBtnGroupControl GetRightGroupSc(int pModeNumm, int pModelType) { ModelBtnGroupControl resSc = null; for (int i = 0; i < RightGroupControlScs.Length; i++) { if (RightGroupControlScs[i].ModelNummber == RightGroupControlScs[i].ModelType) { resSc = RightGroupControlScs[i]; //break; } RightGroupControlScs[i].gameObject.SetActive(false); } return(resSc); }
public void Initialize(Page pBookPage) { if (pBookPage != null && !(pBookPage is CataloguePage)) { ModelBtnGroupControl targetSc = null; if (pBookPage.PageTab % 2 != 0) { targetSc = GetLeftGroupSc(pBookPage.ModelNumber, 0); } else { targetSc = GetRightGroupSc(pBookPage.ModelNumber, 0); } if (targetSc != null) { Debug.Log("Initialize[button]:" + pBookPage.PageTab); targetSc.RefreshData(pBookPage.ButtonItems); targetSc.gameObject.SetActive(targetSc.Used); //Debug.Log(targetSc.ModelType); } } }