Exemple #1
0
    public override void AddAdapters()
    {
        base.AddAdapters();

        Transform transformToUse            = contentPanelTransform;
        CatalogAssetPackAdapter prefabToUse = catalogAssetPackItemAdapterPrefab;

        if (!useAssetPackStyle)
        {
            transformToUse = categoryContentTransform;
            prefabToUse    = categoryAssetPackItemAdapterPrefab;
            categoryListView.SetActive(true);
            assetPackListView.SetActive(false);
        }
        else
        {
            categoryListView.SetActive(false);
            assetPackListView.SetActive(true);
        }

        if (contentPanelTransform == null)
        {
            return;
        }

        foreach (SceneAssetPack sceneAssetPack in contentList)
        {
            CatalogAssetPackAdapter adapter = Instantiate(prefabToUse, transformToUse).GetComponent <CatalogAssetPackAdapter>();
            adapter.SetContent(sceneAssetPack);
            adapter.OnSceneAssetPackClick += SceneAssetPackClick;
        }
    }
    public override void AddAdapters()
    {
        base.AddAdapters();

        Transform transformToUse            = contentPanelTransform;
        CatalogAssetPackAdapter prefabToUse = catalogAssetPackItemAdapterPrefab;

        if (!useAssetPackStyle)
        {
            transformToUse = categoryContentTransform;
            prefabToUse    = categoryAssetPackItemAdapterPrefab;
            categoryListView.SetActive(true);
            assetPackListView.SetActive(false);
        }
        else
        {
            categoryListView.SetActive(false);
            assetPackListView.SetActive(true);
        }

        if (contentPanelTransform == null)
        {
            return;
        }

        foreach (CatalogItemPack catalogItemPack in contentList)
        {
            //TODO: SmartItems This quit all the smart items from the catalog
            if (catalogItemPack.id == BIWSettings.SMART_ITEM_ASSETS_PACK_ID)
            {
                continue;
            }

            CatalogAssetPackAdapter adapter = Instantiate(prefabToUse, transformToUse).GetComponent <CatalogAssetPackAdapter>();
            adapter.SetContent(catalogItemPack);
            adapter.OnCatalogItemPackClick += SceneAssetPackClick;
        }

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

        AudioScriptableObjects.listItemAppear.ResetPitch();
    }
Exemple #3
0
    public override void AddAdapters()
    {
        base.AddAdapters();

        Transform transformToUse            = contentPanelTransform;
        CatalogAssetPackAdapter prefabToUse = catalogAssetPackItemAdapterPrefab;

        if (!useAssetPackStyle)
        {
            transformToUse = categoryContentTransform;
            prefabToUse    = categoryAssetPackItemAdapterPrefab;
            categoryListView.SetActive(true);
            assetPackListView.SetActive(false);
        }
        else
        {
            categoryListView.SetActive(false);
            assetPackListView.SetActive(true);
        }

        if (contentPanelTransform == null)
        {
            return;
        }

        foreach (CatalogItemPack catalogItemPack in contentList)
        {
            CatalogAssetPackAdapter adapter = Instantiate(prefabToUse, transformToUse).GetComponent <CatalogAssetPackAdapter>();
            adapter.SetContent(catalogItemPack);
            adapter.OnCatalogItemPackClick += SceneAssetPackClick;
        }

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

        AudioScriptableObjects.listItemAppear.ResetPitch();
    }