| | |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | attackTeamBtn.AddListener(() => |
| | | { |
| | | SelectTeamFunc((TeamType)HeroUIManager.Instance.GetSelectTeamTypeByAttackType(0)); |
| | | }); |
| | | defendTeamBtn.AddListener(() => |
| | | { |
| | | SelectTeamFunc((TeamType)HeroUIManager.Instance.GetSelectTeamTypeByAttackType(1)); |
| | | }); |
| | | |
| | | mainFBBtn.AddListener(() => |
| | | { |
| | | SelectTeamFunc(TeamType.Story); |
| | | SelectTeamFunc(TeamManager.Instance.GetMainTeamID()); |
| | | }); |
| | | |
| | | jjcBtn.AddListener(() => |
| | | { |
| | | SelectTeamFunc(TeamType.Arena); |
| | | SelectTeamFunc(TeamManager.Instance.GetTeamID((int)BattlePreSetType.Arena)); |
| | | }); |
| | | // tttBtn.AddListener(() => |
| | | // { |
| | |
| | | //管理布阵入口按钮:如竞技场是否根据功能显隐,通天塔和主线只有进攻方布阵默认不显示 |
| | | void RefreshOnTeamBtn() |
| | | { |
| | | if (HeroUIManager.Instance.selectTeamType == TeamType.Arena || |
| | | HeroUIManager.Instance.selectTeamType == TeamType.ArenaDefense) |
| | | { |
| | | attackTeamBtn.SetActive(true); |
| | | defendTeamBtn.SetActive(true); |
| | | if (HeroUIManager.Instance.selectTeamType == TeamType.Arena) |
| | | { |
| | | attackTeamBtn.SelectBtn(true); |
| | | } |
| | | else |
| | | { |
| | | defendTeamBtn.SelectBtn(true); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | attackTeamBtn.SetActive(false); |
| | | defendTeamBtn.SetActive(false); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | team.SaveTeam(); |
| | | } |
| | | |
| | | void SelectTeamFunc(TeamType type) |
| | | void SelectTeamFunc(int type) |
| | | { |
| | | if (HeroUIManager.Instance.selectTeamType == type) |
| | | { |
| | |
| | | heroListScroller.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | |
| | | protected void OnTeamChange(TeamType teamType) |
| | | protected void OnTeamChange(int teamType) |
| | | { |
| | | if (HeroUIManager.Instance.selectTeamType == teamType) |
| | | { |