Пример #1
0
    /// <summary>
    ///     Displays the Objects tab
    /// </summary>
    /// <param name="objects">List of GameObjects to include in the Item List Tab</param>
    /// <param name="tile">Tile to include in the Item List Tab</param>
    /// <param name="position">Position of objects</param>
    public static void ShowItemListTab(IEnumerable <GameObject> objects, LayerTile tile, Vector3 position)
    {
        var tab = Instance.ClientTabs[ClientTabType.ItemList];

        if (!UITileList.Instance)
        {
            UITileList.Instance = tab.GetComponentsInChildren <UITileList>(true)[0];
        }

        if (!Instance.itemListTabExists)
        {
            Instance.UnhideTab(ClientTabType.ItemList);
        }

        UITileList.ClearItemPanel();
        UITileList.UpdateTileList(objects, tile, position);

        if (!UITileList.IsEmpty())
        {
            Instance.SelectTab(ClientTabType.ItemList);
        }
    }