/// <summary> /// 加载方案项 /// </summary> private void CreateItems() { if (MyHead.FangAnTable == null) { return; } MyHead.FangAnTable.gameObject.SetActive(false); List <ShipPlan> infos = ShipPlanDC.GetAllShipPlan(); m_listFangAnBtnItem = new List <FangAnBtnItem>(infos.Count); foreach (ShipPlan info in infos) { GameObject go = NDLoad.LoadWndItem("FangAnBtnItem", MyHead.FangAnTable); if (go) { FangAnBtnItem item = go.GetComponent <FangAnBtnItem>(); if (item) { item.SetData(info); m_listFangAnBtnItem.Add(item); } NGUIUtil.SetItemPanelDepth(go, MyHead.FangAnTable.parent.gameObject); } } NGUIUtil.RepositionTable(MyHead.FangAnTable.gameObject); }
/// <summary> /// 判断能否被分解 /// </summary> public bool CheckSplit() { List <ShipPlan> l = ShipPlanDC.GetAllShipPlan(); foreach (ShipPlan plan in l) { if (plan.CheckHaveTrap(ID) == true) { return(false); } } return(true); }