Exemplo n.º 1
0
 public override void StartSkill(Animator animator)
 {
     hero.state.Mana -= manaCost;
     effectInstance   = KOFItem.InstantiateByPool(effect, LeftHand.transform, gameObject.layer);
     effectInstance.GetComponent <FireDebuff>().target = target;
     StartCoroutine(WaitTime());
 }
Exemplo n.º 2
0
    public void AddDebuff(string debuff, float slowFactor, PoisonSplash splashPrefab, float tickDamage, float tickTime, float duration)
    {
        Debuff temp;

        switch (debuff)
        {
        case "fire":
            temp = new FireDebuff(tickDamage, tickTime, duration, this);
            break;

        case "ice":
            temp = new IceDebuff(slowFactor, duration, this);
            break;

        case "storm":
            temp = new StormDebuff(this, duration);
            break;

        case "poison":
            temp = new PoisonDebuff(tickDamage, tickTime, splashPrefab, duration, this);
            break;

        default:
            Debug.Log("Debuff error");
            temp = new FireDebuff(tickDamage, tickTime, duration, this);
            break;
        }
        if (!debuffs.Exists(x => x.GetType() == debuff.GetType()))
        {
            newDebuffs.Add(temp);
        }
    }
Exemplo n.º 3
0
 /// <summary>
 /// 给敌人附加Fire_Debuff
 /// </summary>
 /// <param name="debuff"></param>
 public override void ApplyDebuff(Enemy enemy)
 {
     fireDebuff = new FireDebuff(enemy, fireDamage, coolTime);
     enemy.AddDebuff(fireDebuff);
 }