protected override void ExcuteActiveSkillLogic(BattleAgentController self, BattleAgentController enemy) { self.QuitFight(); BattlePlayerController battlePlayer = self as BattlePlayerController; battlePlayer.isInEscaping = true; ExploreManager.Instance.expUICtr.ShowEscapeBar(escapeTime, delegate { EscapeCallBack(self, enemy); }); }
private void EscapeCallBack(BattleAgentController self, BattleAgentController enemy) { int fadeStep = fixFadeStep + fadeStepGainBase * skillLevel; BattlePlayerController battlePlayer = self as BattlePlayerController; if (battlePlayer.agent.health <= 0) { return; } int oriFadeStepsLeft = battlePlayer.fadeStepsLeft; if (oriFadeStepsLeft == 0) { self.SetEffectAnim(selfEffectAnimName, null, 0, 0); } battlePlayer.fadeStepsLeft = Mathf.Max(oriFadeStepsLeft, fadeStep); enemy.QuitFight(); ExploreManager.Instance.EnableExploreInteractivity(); ExploreManager.Instance.currentEnteredMapEvent = null; BattlePlayerController bpCtr = self as BattlePlayerController; bpCtr.PlayRoleAnim(CommonData.roleIdleAnimName, 0, null); bpCtr.escapeFromFight = true; bpCtr.isInEscaping = false; bpCtr.enemy = null; bpCtr.FixPositionToStandard(); MapWalkableEvent mwe = enemy.GetComponent <MapWalkableEvent> (); ExploreManager.Instance.MapWalkableEventsStartAction(); mwe.RefreshWalkableInfoWhenQuit(enemy.isDead); if (!mwe.isInMoving) { mwe.QuitFightAndDelayMove(5); } ExploreManager.Instance.expUICtr.QuitFight(); }