コード例 #1
0
    public override void AddAdapters()
    {
        base.AddAdapters();

        if (contentList == null)
        {
            return;
        }

        foreach (Dictionary <string, List <CatalogItem> > assetPackGroups in contentList)
        {
            foreach (KeyValuePair <string, List <CatalogItem> > assetPackGroup in assetPackGroups)
            {
                CatalogAssetGroupAdapter adapter = Instantiate(categoryItemAdapterPrefab, contentPanelTransform).GetComponent <CatalogAssetGroupAdapter>();
                adapter.SetContent(assetPackGroup.Key, assetPackGroup.Value);
                AddAdapter(adapter);
            }
        }
    }
コード例 #2
0
    public override void AddAdapters()
    {
        base.AddAdapters();

        if (contentList == null)
        {
            return;
        }

        foreach (Dictionary <string, List <SceneObject> > assetPackGroups in contentList)
        {
            foreach (KeyValuePair <string, List <SceneObject> > assetPackGroup in assetPackGroups)
            {
                CatalogAssetGroupAdapter adapter = Instantiate(categoryItemAdapterPrefab, contentPanelTransform).GetComponent <CatalogAssetGroupAdapter>();

                adapter.SetContent(assetPackGroup.Key, assetPackGroup.Value);
                adapter.OnSceneObjectClicked   += SceneObjectSelected;
                adapter.OnSceneObjectFavorite  += SceneObjectFavorite;
                adapter.OnAdapterStartDragging += AdapterStartDragging;
                adapter.OnAdapterDrag          += OnDrag;
                adapter.OnAdapterEndDrag       += OnEndDrag;
            }
        }
    }
コード例 #3
0
    public override void AddAdapters()
    {
        base.AddAdapters();

        if (contentList == null)
        {
            return;
        }

        foreach (Dictionary <string, List <CatalogItem> > assetPackGroups in contentList)
        {
            foreach (KeyValuePair <string, List <CatalogItem> > assetPackGroup in assetPackGroups)
            {
                CatalogAssetGroupAdapter adapter = Instantiate(categoryItemAdapterPrefab, contentPanelTransform).GetComponent <CatalogAssetGroupAdapter>();
                adapter.SetContent(assetPackGroup.Key, assetPackGroup.Value);
                SubscribeToEvents(adapter);
            }
        }

        if (dynamicScrollSensitivity != null)
        {
            dynamicScrollSensitivity.RecalculateSensitivity();
        }
    }