Esempio n. 1
0
        // Perform frenzy skill
        public void performFrenzySkill(int entityId, FrenzySkill skill)
        {
            PerformingSkillsComponent performingSkillsComponent = EntityManager.getPerformingSkillsComponent(entityId);
            ExecuteFrenzySkill executeFrenzySkill = new ExecuteFrenzySkill(skill, null);

            EntityFactory.createFrenzySpell(entityId, skill.damageBonus, skill.attackDelayBonus, executeFrenzySkill.delay);
            EntityManager.addComponent(entityId, new FrenzyAIComponent(entityId));
            EntityManager.addComponent(entityId, new UncontrollableComponent(entityId));
            performingSkillsComponent.executingSkills.Add(executeFrenzySkill);
        }
Esempio n. 2
0
 // Execute frenzy skill
 private void executeFrenzy(int entityId, ExecuteFrenzySkill executeSkill)
 {
     EntityManager.removeComponent(entityId, ComponentType.FrenzyAI);
     EntityManager.removeComponent(entityId, ComponentType.Uncontrollable);
     removeExecutedSkill(entityId, executeSkill);
     resetCooldown(entityId, SkillType.Frenzy);
 }