Example #1
0
    public void refreshThisAssemblyLine(GDEtimeTaskData task)
    {
        //展示列表
        showingCard.initTimeTask(task);

        SlavePage.ItemsInit(SDConstants.ItemType.NPC);
        foreach (SingleItem s in SlavePage.items)
        {
            if (s.itemHashcode == task.itemHashcode)
            {
                s.isSelected = true;
                break;
            }
        }
    }
Example #2
0
 public void initAllAssemblyLines()
 {
     ResetAllLines();
     for (int i = 0; i < Level + 2; i++)
     {
         Transform card = Instantiate(WorkingCard) as Transform;
         card.SetParent(scrollrect.content);
         card.transform.localScale = Vector3.one;
         card.gameObject.SetActive(true);
         FactoryWorkCard fwc    = card.GetComponent <FactoryWorkCard>();
         string          taskId = string.Format("TT_FACT#{0:D2}", i);
         GDEtimeTaskData TD;
         SDDataManager.Instance.haveTimeTaskByTaskId(taskId, out TD);
         if (TD == null)
         {
             SDDataManager.Instance.AddTimeTask
                 (SDConstants.timeTaskType.FACT, 0, AllProducts[0].ID, taskId);
             SDDataManager.Instance.haveTimeTaskByTaskId(taskId, out TD);
         }
         fwc.initTimeTask(TD);
         ALLAssemblyLines.Add(fwc);
     }
 }