using Common.Utility.CombatEvent; using Fort23.Core; using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical; namespace GameLogic.Combat.Skill { /// /// 极速齿轮 后槽位技能在催动时获得转盘加速10%,持续2秒 /// public class S501401 : SkillBasic { private float _addSpeed; private bool _isUpdate; private float _addTime; protected override void ProUseSkill() { } protected override void ProDispose() { CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa); Finish(); } protected override void ProActiveSkill() { CombatEventManager.Instance.AddEventListener(CombatEventType.AddUseGongFa, AddUseGongFa); } protected override void ProCombatUpdate(float time) { if (_isUpdate) { _addTime += time; if (_addTime > SelfSkillConfig.effectValue[1]) { Finish(); } } } private void Finish() { CombatHeroEntity.CurrCombatHeroInfo.addAttSpeed_bl -= _addSpeed; _addSpeed = 0; _isUpdate = false; } private void AddUseGongFa(IEventData iEventData) { AddUseGongFaEventData addUseGongFaEventData = iEventData as AddUseGongFaEventData; if (addUseGongFaEventData.SkillBasic.CombatHeroEntity == CombatHeroEntity && addUseGongFaEventData.SkillBasic.index - 1 == index) { _addTime = 0; _isUpdate = true; Finish(); _addSpeed = SelfSkillConfig.effectValue[0]; CombatHeroEntity.CurrCombatHeroInfo.addAttSpeed_bl += _addSpeed; } } } }