| | |
| | | |
| | | autoBtn.AddListener(() => |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen(108, true)) |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AutoFight, true)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | |
| | | blessLVBtn.AddListener(() => |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlessLV, true)) |
| | | { |
| | | return; |
| | | } |
| | | UIManager.Instance.OpenWindow<BlessLVWin>(); |
| | | }); |
| | | |
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange; |
| | | FirstChargeManager.Instance.OnUpdateFirstChargeInfo += OnUpdateFirstChargeInfo; |
| | | GlobalTimeEvent.Instance.secondEvent += OnSecondEvent; |
| | | HeroUIManager.Instance.OnUnLockHeroCountEvent += OnUnLockHeroCountEvent; |
| | | Display(); |
| | | DisplayFirstChargeBtn(); |
| | | |
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange; |
| | | FirstChargeManager.Instance.OnUpdateFirstChargeInfo -= OnUpdateFirstChargeInfo; |
| | | GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent; |
| | | HeroUIManager.Instance.OnUnLockHeroCountEvent -= OnUnLockHeroCountEvent; |
| | | |
| | | // 关闭的时候把战斗界面也给关了 虽然是在外面开的 |
| | | UIManager.Instance.CloseWindow<BattleWin>(); |
| | |
| | | |
| | | private void OnClickEnterBoss() |
| | | { |
| | | BattleField battleField = BattleManager.Instance.GetBattleFieldByMapID(2); //BOSS战斗 |
| | | // BattleField battleField = BattleManager.Instance.GetBattleFieldByMapID(2); //BOSS战斗 |
| | | |
| | | if (null != battleField) |
| | | { |
| | | FullScreenBattleWin fsBattleWin = UIManager.Instance.OpenWindow<FullScreenBattleWin>(); |
| | | fsBattleWin.SetBattleField(battleField); |
| | | return; |
| | | } |
| | | // if (null != battleField) |
| | | // { |
| | | // StoryBossBattleWin fsBattleWin = UIManager.Instance.OpenWindow<StoryBossBattleWin>(); |
| | | // fsBattleWin.SetBattleField(battleField); |
| | | // return; |
| | | // } |
| | | |
| | | UIManager.Instance.OpenWindow<MainBossEnterWin>(); |
| | | } |
| | |
| | | getReward.DataEx = (uint)TaskManager.Instance.mainTask.TaskID; |
| | | GameNetSystem.Instance.SendInfo(getReward); |
| | | } |
| | | else |
| | | { |
| | | //根据任务类型引导 |
| | | } |
| | | |
| | | TaskManager.Instance.ClickTask(); |
| | | } |
| | | |
| | | void DisplayCard(TeamType teamType) |
| | | { |
| | | if (teamType != TeamType.Story) |
| | | return; |
| | | var team = TeamManager.Instance.GetTeam(teamType); |
| | | var heros = team.GetHerosOnTeam(); |
| | | //显示卡牌 |
| | | for (int i = 0; i < heroFightingCardCells.Length; i++) |
| | | { |
| | | heroFightingCardCells[i].Display(i); |
| | | heroFightingCardCells[i].Display(i, heros); |
| | | } |
| | | } |
| | | |
| | |
| | | //【普通】关卡名字1-6 |
| | | levelName.text = Language.Get("mainui7", chapterConfig.Level, chapterConfig.ChapterName, chapterID, levelNum); |
| | | |
| | | bool canChallengeBoss = AutoFightModel.Instance.CanChallengeBoss(); |
| | | bool canChallengeBoss = MainLevelManager.Instance.CanChallengeBoss(); |
| | | //BOSS |
| | | if (canChallengeBoss) |
| | | { |
| | |
| | | { |
| | | DisplayFirstChargeBtn(); |
| | | } |
| | | |
| | | void OnUnLockHeroCountEvent() |
| | | { |
| | | DisplayCard(TeamType.Story); |
| | | } |
| | | } |