@Override public void pulse(int deltaTime) { if (timerBuffPulse == null) { timerBuffPulse = new TickTimer(); timerBuffPulse.start(getTime(), BuffManager.INTERVAL_PULSE); } if (timerStatePulse == null) { timerStatePulse = new TickTimer(); timerStatePulse.start(getTime(), 100); } super.pulse(deltaTime); // 单元移动了 pulseMove(timeCurr); // 周期到了,则更新身上的buff if (timerBuffPulse.isPeriod(timeCurr)) { BuffManager.inst().pulse(this, timeCurr); } // 施放可以施放的有前摇的技能 updateSkill(timeCurr); // 更新各种状态 updateState(timeCurr); }
@Override public void doSkillEffectToTar(UnitObject unitDef) { // 目标加buff UnitObject uo = skill.unitObj; if (uo == null || uo.isDie()) { return; } Long useId = uo.id; // buff 等级概率压制 int prop = conf.levelParam; if (skill.skillLevel >= unitDef.getUnit().getLevel()) { if (prop > 0) { buffProp = prop; } } if (useId != null) { if (buffProp >= unitDef.nextInt(100)) { BuffManager.inst().add(unitDef, useId, buffSn, skill.confSkill.sn, conf.targetFriend); } } }