protected override void Awake()
 {
     base.Awake();
     CollectionPageManager component = base.GetComponent<CollectionPageManager>();
     this.pageLeftRegion = component.m_pageLeftClickableRegion;
     this.pageRightRegion = component.m_pageRightClickableRegion;
     this.pageDragRegion = component.m_pageDraggableRegion;
     this.pageDragRegion.gameObject.SetActive(true);
     this.pageDragRegion.AddEventListener(UIEventType.PRESS, new UIEvent.Handler(this.OnPageDraggableRegionDown));
 }
Ejemplo n.º 2
0
    public int GetNumVisibleClasses()
    {
        int num = 0;
        CollectionPageManager pageManager = CollectionManagerDisplay.Get().m_pageManager;

        for (int i = 0; i < this.m_classTags.Length; i++)
        {
            if (pageManager.GetNumPagesForClass(this.m_classTags[i]) > 0)
            {
                num++;
            }
        }
        return(num);
    }
Ejemplo n.º 3
0
    public void SetDefaults()
    {
        this.SetCardBacksEnabled(true);
        this.SetHeroSkinsEnabled(true);
        for (int i = 0; i < this.m_classTags.Length; i++)
        {
            TAG_CLASS?classTag = null;
            this.m_classButtons[i].SetClass(classTag, this.m_inactiveMaterial);
        }
        CollectionPageManager pageManager = CollectionManagerDisplay.Get().m_pageManager;
        int index = 0;

        for (int j = 0; j < this.m_classTags.Length; j++)
        {
            if (pageManager.GetNumPagesForClass(this.m_classTags[j]) > 0)
            {
                this.m_classButtons[index].SetClass(new TAG_CLASS?(this.m_classTags[j]), this.m_classMaterials[j]);
                int numNewCardsForClass = CollectionManagerDisplay.Get().m_pageManager.GetNumNewCardsForClass(this.m_classTags[j]);
                this.m_classButtons[index].SetNewCardCount(numNewCardsForClass);
                index++;
            }
        }
    }