static bool IsCopyEndId(int qid) { foreach (KeyValuePair <int, CopyData> pair in CopyData.GetData()) { if (qid == pair.Value._EndID) { return(true); } } return(false); }
void Start() { UIManager.SetButtonEventHandler(clostBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0); Dictionary <int, CopyData> metaData = CopyData.GetData(); foreach (var x in metaData.Values) { GameObject objCell = Object.Instantiate(cell.gameObject) as GameObject; CopyOpenCellUI cellUI = objCell.GetComponent <CopyOpenCellUI>(); cellUI.cellData = x; objCell.transform.parent = grid.transform; objCell.SetActive(true); objCell.transform.localScale = Vector3.one; } noOpenCell.transform.parent = grid.transform; noOpenCell.SetActive(true); noOpenCell.transform.localScale = Vector3.one; }