Beispiel #1
0
            public void SelectType(ItemListWindow.ItemSource.ItemType itemType)
            {
                if (this.m_ItemType == itemType)
                {
                    return;
                }
                Func <ItemListWindow.ItemSource.ItemParam, bool> predicate = (Func <ItemListWindow.ItemSource.ItemParam, bool>)null;

                switch (itemType)
                {
                case ItemListWindow.ItemSource.ItemType.USED:
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: reference to a compiler-generated method
                    predicate = new Func <ItemListWindow.ItemSource.ItemParam, bool>(new ItemListWindow.ItemSource.\u003CSelectType\u003Ec__AnonStorey340()
                    {
                        UsedItemTypes = new List <EItemType>()
                        {
                            EItemType.ExpUpPlayer,
                            EItemType.ExpUpUnit,
                            EItemType.ExpUpSkill,
                            EItemType.ExpUpEquip,
                            EItemType.ExpUpArtifact,
                            EItemType.GoldConvert,
                            EItemType.Ticket,
                            EItemType.Used
                        }
                    }.\u003C\u003Em__393);
                    break;

                case ItemListWindow.ItemSource.ItemType.EQUIP:
                    predicate = (Func <ItemListWindow.ItemSource.ItemParam, bool>)(prop => prop.itemType == EItemType.Equip);
                    break;

                case ItemListWindow.ItemSource.ItemType.ITEM_PIECE:
                    predicate = (Func <ItemListWindow.ItemSource.ItemParam, bool>)(prop =>
                    {
                        if (prop.itemType != EItemType.ItemPiece && prop.itemType != EItemType.ItemPiecePiece)
                        {
                            return(prop.itemType == EItemType.ArtifactPiece);
                        }
                        return(true);
                    });
                    break;

                case ItemListWindow.ItemSource.ItemType.MATERIAL:
                    predicate = (Func <ItemListWindow.ItemSource.ItemParam, bool>)(prop => prop.itemType == EItemType.Material);
                    break;

                case ItemListWindow.ItemSource.ItemType.UNIT_PIECE:
                    predicate = (Func <ItemListWindow.ItemSource.ItemParam, bool>)(prop => prop.itemType == EItemType.UnitPiece);
                    break;
                }
                this.Clear();
                if (predicate != null)
                {
                    this.SetTable((ContentSource.Param[]) this.m_Params.Where <ItemListWindow.ItemSource.ItemParam>(predicate).ToArray <ItemListWindow.ItemSource.ItemParam>());
                }
                else
                {
                    this.SetTable((ContentSource.Param[]) this.m_Params.ToArray());
                }
                this.contentController.Resize(0);
                bool    flag               = false;
                Vector2 anchoredPosition   = this.contentController.anchoredPosition;
                Vector2 lastPageAnchorePos = this.contentController.GetLastPageAnchorePos();

                if (anchoredPosition.x < lastPageAnchorePos.x)
                {
                    flag = true;
                    anchoredPosition.x = lastPageAnchorePos.x;
                }
                if (anchoredPosition.y < lastPageAnchorePos.y)
                {
                    flag = true;
                    anchoredPosition.y = lastPageAnchorePos.y;
                }
                if (flag)
                {
                    this.contentController.anchoredPosition = anchoredPosition;
                }
                this.contentController.scroller.StopMovement();
                this.m_ItemType = itemType;
            }
Beispiel #2
0
 public override void Release()
 {
     base.Release();
     this.m_ItemType = ItemListWindow.ItemSource.ItemType.NONE;
 }