public void OnSelectedRoleForUpgrade(UIHeroSlotChoseForUpgrade uiHeroChose) { if (_heroSlotForUpgradeChose != null) { _heroSlotForUpgradeChose.OnDeSelected(); } _heroSlotForUpgradeChose = uiHeroChose; _curRoleUpgrade = _heroSlotForUpgradeChose._userRole; if (_curRoleUpgrade.Base.Grade >= maxGrade) { MessageBox.ShowDialog(GameManager.localization.GetText("ErrorCode_UpStart_MaxGrade"), UINoticeManager.NoticeType.Message); statsManager.SetRole(_curRoleUpgrade, _curRoleUpgrade); return; } ShowCurRoleUpgrade(); GetItemsRequire(); effectManager.resourceCount = itemsRequire.Count; ShowInfo(); ShowItem(); arrowSelectHero.SetActive(false); arrowButton.SetActive(true); tweenHideHero.Play(true); }
private void ShowAllUserRoles() { foreach (UserRole role in GameManager.GameUser.UserRoles) { GameObject go = NGUITools.AddChild(userRoleRoot, ChoseHeroPrefab); UIHeroSlotChoseForUpgrade slot = go.GetComponent <UIHeroSlotChoseForUpgrade>(); slot.SetUser(role, this); _choseHeroSlots.Add(slot); } userRoleRoot.GetComponent <UIGrid>().Reposition(); }
private void ShowAllUserRoles() { UIGrid grid = userRoleRoot.GetComponent <UIGrid>(); foreach (UserRole role in GameManager.GameUser.UserRoles) { if (role.Base.Level < RoleConfig.LEVEL_MAX) { GameObject go = NGUITools.AddChild(userRoleRoot, ChoseHeroPrefab); UIHeroSlotChoseForUpgrade slot = go.GetComponent <UIHeroSlotChoseForUpgrade>(); slot.SetUser(role, this); _choseHeroSlots.Add(slot); } } grid.Reposition(); }
public void OnSelectedRoleForUpgrade(UIHeroSlotChoseForUpgrade uiHeroChose) { ClearFeed(); arrowSelectHero.SetActive(false); arrowSelectFeed.SetActive(true); arrowButton.SetActive(false); if (_heroSlotForUpgradeChose != null) { _heroSlotForUpgradeChose.OnDeSelected(); } _heroSlotForUpgradeChose = uiHeroChose; _curRoleUpgrade = uiHeroChose._userRole; ShowCurRoleUpgrade(); StartCoroutine(ShowAllFeed()); ShowStat(); _addEXP = 0; tweenCloseSelectedHero.Play(true); }