| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | lastClickTime = Time.realtimeSinceStartup; |
| | | // lastClickTime = Time.realtimeSinceStartup; |
| | | needGuide = !MainLevelManager.Instance.IsPassedByMainLevelID(BattleManager.Instance.fightGuideMainLevelLimit); |
| | | |
| | | // SetBattleField(BattleManager.Instance.storyBattleField); |
| | | BattleManager.Instance.onBattleFieldCreate += OnCreateBattleField; |
| | | UIManager.Instance.OnOpenWindow += OnOpenWindow; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | UIManager.Instance.CloseWindow<BattleHUDWin>(); |
| | | BattleManager.Instance.onBattleFieldCreate -= OnCreateBattleField; |
| | | UIManager.Instance.OnOpenWindow -= OnOpenWindow; |
| | | } |
| | | |
| | | private void OnCreateBattleField(string arg1, BattleField field) |
| | |
| | | battleField.UpdateCanvas(canvas); |
| | | } |
| | | |
| | | |
| | | void OnOpenWindow(UIBase ui) |
| | | { |
| | | if (ui is MainBossEnterWin) |
| | | { |
| | | lastClickTime = Time.realtimeSinceStartup; |
| | | } |
| | | } |
| | | |
| | | // 新手期 玩家未做任何操作下,在主线战斗中提醒点击战锤 |
| | | void LateUpdate() |
| | |
| | | if (!needGuide) |
| | | return; |
| | | |
| | | if (Input.GetMouseButtonDown(0)) |
| | | { |
| | | lastClickTime = Time.realtimeSinceStartup; |
| | | } |
| | | // if (Input.GetMouseButtonDown(0)) |
| | | // { |
| | | // lastClickTime = Time.realtimeSinceStartup; |
| | | // } |
| | | |
| | | |
| | | if (Time.realtimeSinceStartup - lastClickTime > BattleManager.Instance.fightGuideNoClickSeconds) |
| | | { |
| | | if (AutoFightModel.Instance.isAutoAttack) |
| | | { |
| | | return; |
| | | } |
| | | // if (AutoFightModel.Instance.isAutoAttack) |
| | | // { |
| | | // return; |
| | | // } |
| | | |
| | | if (NewBieCenter.Instance.inGuiding) |
| | | { |
| | |
| | | return; |
| | | } |
| | | |
| | | if (!MainLevelManager.Instance.CanChallengeBoss()) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | NewBieCenter.Instance.StartNewBieGuide(BattleManager.Instance.fightGuideID); |
| | | needGuide = !MainLevelManager.Instance.IsPassedByMainLevelID(BattleManager.Instance.fightGuideMainLevelLimit); |
| | | BattleManager.Instance.storyBattleField.IsPause = false; |