public override void Die(Entity byEntity) { ConsolePrinter.PrintAction(byEntity, "killed", this, true); OnEntityKilled(this); // Drop items (give the player Potions and stuff.) Random rand = new Random(); var luckFactor = rand.Next(1, 4); if (luckFactor == 1) { var item = GenerateItem(); byEntity.ItemBag.Add(item); ConsolePrinter.PrintMessage(byEntity.Name + " gadered an item '" + item.Name + "' from " + Name + "!", false); } }
public override void Die(Entity byEntity) { ConsolePrinter.PrintAction(byEntity, "killed", this, true); OnEntityKilled.Invoke(this); }