Exemplo n.º 1
0
        public bool hasActiveSkill(int id, ActiveSkillType activeType)
        {
            var skills = player.getActiveSkills();

            switch (activeType)
            {
            case ATTACK:
                var targetAttackSkill = AttackSkillMasterManager.getInstance().getAttackSkillFromId(id);
                return(skills.Contains(targetAttackSkill));

            case BUF:
                var targetBufSkill = BufSkillMasterManager.getInstance().getBufSkillFromId(id);
                return(skills.Contains(targetBufSkill));

            case DEBUF:
                var targetDebufSkill = DebufSkillMasterManager.getInstance().getDebufSkillFromId(id);
                return(skills.Contains(targetDebufSkill));

            case HEAL:
                var targetHealSkill = HealSkillMasterManager.getInstance().getHealSkillFromId(id);
                return(skills.Contains(targetHealSkill));

            case MOVE:
                var targetMoveSkill = MoveSkillMasterManager.getInstance().getMoveSkillFromId(id);
                return(skills.Contains(targetMoveSkill));
            }

            throw new NotSupportedException("unkown activeSkillType");
        }
Exemplo n.º 2
0
 protected override void setParameter()
 {
     observeSkill      = AttackSkillMasterManager.getInstance().getAttackSkillFromId(OBSERVE_SKILL_ID);
     this.observeSkill = AttackSkillMasterManager.getInstance().getAttackSkillFromId(OBSERVE_SKILL_ID);
     this.attack       = observeSkill.getRawAttack();
     this.hit          = observeSkill.getRawHit();
     this.cost         = observeSkill.getRawCost();
     this.delay        = observeSkill.getRawDelay();
 }
Exemplo n.º 3
0
 public void loadProgresses(int id)
 {
     EnemyMasterManager.getInstance().addProgress(id);
     AttackSkillMasterManager.getInstance().addProgress(id);
     HealSkillMasterManager.getInstance().addProgress(id);
     BufSkillMasterManager.getInstance().addProgress(id);
     DebufSkillMasterManager.getInstance().addProgress(id);
     HealItemMasterManager.getInstance().addProgress(id);
     ItemMaterialMasterManager.getInstance().addProgress(id);
 }
Exemplo n.º 4
0
        public static IActiveSkill getActiveSkill(ActiveSkillType type, int id)
        {
            switch (type)
            {
            case ActiveSkillType.ATTACK:
                return(AttackSkillMasterManager.getInstance().getAttackSkillFromId(id));

            case ActiveSkillType.BUF:
                return(BufSkillMasterManager.getInstance().getBufSkillFromId(id));

            case ActiveSkillType.DEBUF:
                return(DebufSkillMasterManager.getInstance().getDebufSkillFromId(id));

            case ActiveSkillType.HEAL:
                return(HealSkillMasterManager.getInstance().getHealSkillFromId(id));

            case ActiveSkillType.MOVE:
                return(MoveSkillMasterManager.getInstance().getMoveSkillFromId(id));

            default: throw new NotSupportedException("unkonwn skillType " + type);
            }
        }