public void Show() { // 播放放大动画 // animation.Play(); //gameObject.SetActive(true); currentTab = AwardTab.None; TweenScale.Begin(gameObject, 0.1666f, NormalScale, Vector3.one, null); TweenAlpha.Begin(gameObject, 0.1666f, 1); TweenAlpha.Begin(DraggablePanel.gameObject, 0.1666f, 1); SwitchTab(AwardTab.Daily); }
private void SwitchTab(object obj) { if (currentTab == (AwardTab)obj) { return; } SoundManager.Instance.PlaySoundEffect("Sound_Button_PVG_ListAwardIntroductionChange"); currentTab = (AwardTab)obj; // 更改按钮显示 DailyAwardTab.spriteSwithList.ApplyAllItem(P => P.ChangeSprite(currentTab == AwardTab.Daily? 2: 1)); SeasonAwardTab.spriteSwithList.ApplyAllItem(P => P.ChangeSprite(currentTab == AwardTab.Season? 2: 1)); LevelDescriptionTab.spriteSwithList.ApplyAllItem(P => P.ChangeSprite(currentTab == AwardTab.LevelDescription? 2: 1)); RightTableHeader.text = (currentTab == AwardTab.LevelDescription)? "晋升条件": "奖励"; // 列表中item只创建一次 if (awardSingleItemList != null && awardSingleItemList.Count == 0) { for (int index = 0, imax = PvpUiPanelManager.Instance.GroupConfigDatabase._dataTable.Length; index < imax; index++) { GameObject item = NGUITools.AddChild(Grid.gameObject, PVPAwardSingleItemPrefab); item.name = PVPAwardSingleItemPrefab.name + index.ToString().PadLeft(2, '0'); PVPAwardSingleItem itemScript = item.GetComponent <PVPAwardSingleItem>(); awardSingleItemList.Add(itemScript); } Grid.sorted = true; Grid.Reposition(); } DraggablePanel.DisableSpring(); DraggablePanel.ResetPosition(); UpdateSingleItem(); }
private PVPGroupListAward GetListAwardData(AwardTab awardType, int level) { return(PvpUiPanelManager.Instance.GroupListAwardDatabase._dataTable.SingleOrDefault(P => P.ListAwardGroup == level && P.ListAwardType == (int)awardType)); }