/// <summary> /// What happens to the entities when the Spell is used on them /// </summary> /// <param name="User">The BattleEntity that used this Spell</param> /// <param name="Entities">The BattleEntities affected by the Spell</param> public void OnUse(BattleEntity User, params BattleEntity[] Entities) { if (Entityeffect == null) { Debug.LogError($"Spell {Name}'s EntityEffect is null!"); return; } Entityeffect.UseEffect(new Globals.AffectableInfo(User, this), Entities); }
/// <summary> /// Uses the item, inflicting the EntityEffect on the designated entities /// </summary> /// <param name="User">The BattleEntity that used the Item</param> /// <param name="Entities">The BattleEntities affected by the Item</param> public void OnUse(BattleEntity User, params BattleEntity[] Entities) { //Call use event ItemUseEvent?.Invoke(this, User); if (Entityeffect == null) { Debug.LogError($"Item {Name}'s EntityEffect is null!"); return; } Entityeffect.UseEffect(new Globals.AffectableInfo(User, this), Entities); }