protected override void ApplyEffect(Tower source, Npc target) { var dmg = 0f; if (source.HasAttribute(AttributeName.AttackDamage)) { dmg = source.Attributes.GetAttribute(AttributeName.AttackDamage).Value; } var offset = new Vector3(0, target.transform.lossyScale.y, 0); var effectText = (int)(2 * dmg) + "!"; var textSize = 2; var textDuration = 2.0f; var textEffect = new TextEffectData(effectText, textSize, GameSettings.MagicalCritColor, target.gameObject, offset, textDuration); GameManager.Instance.SpecialEffectManager.PlayTextEffect(textEffect); target.DealDamage(dmg, source); }
public override void ApplyEffectToNpc(Npc enteringNpc) { enteringNpc.DealDamage(_damage, _source); }