public void Start() { this.Shop.Start(); DayChanged += (sender, e) => { Employee applicant = null; var name = this.NameDatabase[this.Random.Next(this.NameDatabase.Length)]; var salary = this.Random.Next(1, 100); switch (this.Random.Next(4)) { case 0: applicant = new Herbalist(name, salary); break; case 1: applicant = new Guard(name, salary); break; case 2: applicant = new Apothecary(name, salary); break; case 3: applicant = new Shopkeeper(name, salary); break; } if (applicant != null) { this.ReceiveApplication(applicant); } }; DayChanged += (sender, e) => { var flask = (Flask)this.FlaskDatabase[this.Random.Next(this.FlaskDatabase.Length)].Clone(); this.DisplayFlask(flask); }; DayChanged += (sender, e) => { this.Shop.Gold += 1000; }; }
private void OnPotionCreated(Potion potion, Apothecary apothecary) => PotionCreated?.Invoke(this, new PotionCreatedEventArgs(potion, apothecary));
public void CreatePotion(Flask flask, Solvent solvent, Ingredient[] ingredients, Apothecary apothecary) { var potion = new Potion(flask, solvent, ingredients); this.PotionsForSale.Add(potion); this.RemovePotionMaterials(flask, solvent, ingredients); this.OnPotionCreated(potion, apothecary); }