1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using Common.Utility.CombatEvent;
- using Fort23.Core;
- using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
- namespace GameLogic.Combat.Skill
- {
- /// <summary>
- /// 极速齿轮 后槽位技能在催动时获得转盘加速10%,持续2秒
- /// </summary>
- 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;
- }
- }
- }
- }
|