private void addRewardGalleryCellToGrid(RewardGalleryCell.Content content) { RewardGalleryCell item = PlayerView.Binder.RewardGalleryCellPool.getObject(content.Type); item.transform.SetParent(this.RewardTm, false); item.initialize(content, null); this.m_rewardGalleryCells.Add(item); item.gameObject.SetActive(true); }
private void addItemToGrid(Item item, int rarity, SpriteAtlasEntry sprite) { RewardGalleryCell.Content content2 = new RewardGalleryCell.Content(); content2.Obj = item; content2.Sprite = sprite; content2.StarRank = rarity; content2.DoUseSmallStars = true; RewardGalleryCell.Content content = content2; RewardGalleryCell cell = PlayerView.Binder.RewardGalleryCellPool.getObject(RewardGalleryCellType.RewardGalleryCellFazer); cell.transform.SetParent(this.ItemGrid, false); cell.initialize(content, new Action <RewardGalleryCell>(this.onItemCellClick)); this.m_rewardGalleryCells.Add(cell); cell.gameObject.SetActive(true); }
private void setupChest(GameLogic.ChestType chestType) { ChestBlueprint blueprint = ConfigUi.CHEST_BLUEPRINTS[chestType]; RewardGalleryCell.Content content2 = new RewardGalleryCell.Content(); content2.Sprite = blueprint.Icon; RewardGalleryCell.Content content = content2; RewardGalleryCell item = PlayerView.Binder.RewardGalleryCellPool.getObject(RewardGalleryCellType.RewardGalleryCellFazer); RectTransformExtensions.SetSize(item.RectTm, new Vector2(300f, 300f)); item.transform.SetParent(this.ChestRoot, false); item.initialize(content, null); this.m_rewardGalleryCells.Add(item); item.gameObject.SetActive(true); }