Exemple #1
0
        /// <summary>
        /// 创建工作票列表项
        /// </summary>
        public WorkTicketItem_N CreateWorkTicketItem()
        {
            WorkTicketItem_N itemT = Instantiate(workTicketItemPrefab);

            itemT.transform.SetParent(grid.transform);
            itemT.transform.localPosition = Vector3.zero;
            itemT.transform.localScale    = Vector3.one;
            itemT.gameObject.SetActive(true);
            return(itemT);
        }
Exemple #2
0
        public void CreateWorkTicketGrid()
        {
            ClearItems();
            WorkNum = 0;
            List <WorkTicket> searchWorkTicket = workTicketList.FindAll((item) => WorkTicketContains(item));

            foreach (WorkTicket w in searchWorkTicket)
            {
                WorkNum = WorkNum + 1;
                WorkTicketItem_N itemT = CreateWorkTicketItem();
                itemT.Init(w);
            }
        }