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()); }
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); } }
/// <summary> /// 给敌人附加Fire_Debuff /// </summary> /// <param name="debuff"></param> public override void ApplyDebuff(Enemy enemy) { fireDebuff = new FireDebuff(enemy, fireDamage, coolTime); enemy.AddDebuff(fireDebuff); }