Beispiel #1
0
    static public ShowOrderTileWithIcons Create(string root, Transform container)
    {
        ShowOrderTileWithIcons obj = null;

        root = Root.show_Order_Tile_With_Icons;

        obj = (ShowOrderTileWithIcons)Resources.Load(root, typeof(ShowOrderTileWithIcons));
        obj = (ShowOrderTileWithIcons)Instantiate(obj, new Vector3(), Quaternion.identity);

        obj.transform.SetParent(container);
        return(obj);
    }
Beispiel #2
0
    /// <summary>
    /// Will display the order is pass as param. Bz 'i' will keep looping and puttin the towards the botton of the
    /// _orders tab. Will make the orders Childs of _order tab
    /// </summary>
    /// <param name="i"></param>
    /// <param name="order"></param>
    void Display1Order(int i, Order order, Vector3 iniPosP, string root, bool isOnProcess = false)
    {
        var isOrderOnList = _showOrders.Find(a => a.OrderId == order.ID);

        //brand new tile
        if (isOrderOnList == null)
        {
            var orderShow = ShowOrderTileWithIcons.Create(root, _orders.transform);
            orderShow.Show(order);
            orderShow.Reset(i, order.TypeOrder, isOnProcess);
            _showOrders.Add(orderShow);
        }
        //update existing
        else
        {
            isOrderOnList.Show(order);
            isOrderOnList.Reset(i, order.TypeOrder, isOnProcess);
        }
    }