Пример #1
0
    /// <summary>
    /// 显示工作票路线
    /// </summary>
    public void ShowWorkTicketPath(WorkTicket workTicketT)
    {
        Hide();
        DepNode depNodeT = RoomFactory.Instance.GetDepNodeById(workTicketT.AreaId);

        if (depNodeT == null)
        {
            return;
        }
        GameObject        targetTagObj1 = UGUIFollowTarget.CreateTitleTag(depNodeT.NodeObject.gameObject, Vector3.zero);
        GameObject        uiObj1        = UGUIFollowManage.Instance.CreateItem(followUI.gameObject, targetTagObj1, "TwoTicketFollowUI", null, false, false);
        TwoTicketFollowUI follow1       = uiObj1.GetComponent <TwoTicketFollowUI>();

        follow1.Init(true, "1", depNodeT.NodeName);
        //CreateWorkTicketHistoryPath(workTicketT);
    }
Пример #2
0
    /// <summary>
    /// 显示工作票路线
    /// </summary>
    public void ShowOperationTicketPath(OperationTicket operationTicketT)
    {
        Hide();
        if (operationTicketT.OperationItems == null)
        {
            return;
        }
        for (int i = 0; i < operationTicketT.OperationItems.Length; i++)
        {
            OperationItem item = operationTicketT.OperationItems[i];
            //DevNode devNodeT = RoomFactory.Instance.GetDevById(item.DevId);
            //if (devNodeT == null) continue;
            //GameObject targetTagObj1 = UGUIFollowTarget.CreateTitleTag(devNodeT.gameObject, Vector3.zero);
            //GameObject uiObj1 = UGUIFollowManage.Instance.CreateItem(followUI.gameObject, targetTagObj1, "TwoTicketFollowUI", null, false, false);
            //MobileInspectionFollowUI follow1 = uiObj1.GetComponent<MobileInspectionFollowUI>();
            //follow1.Init(true, i.ToString(), devNodeT.name);

            RoomFactory.Instance.GetDevById(item.DevId,
                                            (devNodeT) =>
            {
                if (devNodeT == null)
                {
                    return;
                }
                GameObject targetTagObj1 = UGUIFollowTarget.CreateTitleTag(devNodeT.gameObject, Vector3.zero);
                GameObject uiObj1        = UGUIFollowManage.Instance.CreateItem(followUI.gameObject, targetTagObj1, "TwoTicketFollowUI", null, false, false);
                //MobileInspectionFollowUI follow1 = uiObj1.GetComponent<MobileInspectionFollowUI>();
                TwoTicketFollowUI follow1    = uiObj1.GetComponent <TwoTicketFollowUI>();
                List <OperationItem> listT   = operationTicketT.OperationItems.ToList();
                OperationItem operationItemT = listT.Find((itemt) => itemt.DevId == devNodeT.Info.DevID);
                //index = index + 1;
                //if (index > 0)
                //{
                //    follow1.Init(true, index.ToString(), devNodeT.name);
                //}
                follow1.Init(true, operationItemT.OrderNum.ToString(), devNodeT.name);
            });
        }

        //CreateOperationTicketHistoryPath(operationTicketT);
    }