Ejemplo n.º 1
0
 private void Awake()
 {
     animator     = GetComponent <Animator>();
     skillSlot[0] = new MeleeAttackSkill();
     skillSlot[1] = new SpeedUpBuffSkill();
     skillSlot[2] = new OverWhelmBuffSkill();
 }
 public ApproachMeleeRange(Combatant source)
     : base(source)
 {
     _source = (Combatant)source;
     if ((_walk = _source.GetSkill<WalkSkill>()) == null) {
         throw new ArgumentException("source", "Combatant " + source.Name + " doesn't have a Walk skill");
     }
     if ((_melee = _source.GetSkill<MeleeAttackSkill>()) == null) {
         throw new ArgumentException("source", "Combatant " + source.Name + " doesn't have a Melee Attack skill");
     }
 }
Ejemplo n.º 3
0
        public void SetSkillSlot(SkillType skillType, int slotNum)
        {
            switch (skillType)
            {
            case SkillType.Melee:
                SkillList[slotNum] = new MeleeAttackSkill();
                break;

            case SkillType.Range:
                SkillList[slotNum] = new RangeAttackSkill();
                break;

            case SkillType.SpeedUpBuff:
                SkillList[slotNum] = new SpeedUpBuffSkill();
                break;

            case SkillType.OverWhelmBuff:
                SkillList[slotNum] = new OverWhelmBuffSkill();
                break;
            }
        }
 public AttackWithMelee(Combatant source)
 {
     _source = source;
     _melee = _source.GetSkill<MeleeAttackSkill>();
 }