public void OnCreateHero(Wizard wizard) { if (_heroDelegate != null) { HeroCreateEventArgs e = new HeroCreateEventArgs(wizard); _heroDelegate(this, e); } }
public override Cell CreateInstance(World world) { HeroEquipment equipment = new HeroEquipment("simple helmet", "simple armor", "simple shoes", CapacityBelt); HeroStay hs = new HeroStay(Strong, Agility, Endurance, Intelligence); Wizard wizard = new Wizard(hs, world, equipment, Health, Mana, Damage, Armor, LevelFraction); OnCreateHero(wizard); return wizard; }
public HeroCreateEventArgs(Wizard wizard) { _wizard = wizard; }