public Engine(IRenderer renderer, IUserKeyboardInput userInput, IAim aim, GameInitializator gameInitializator) { this.Renderer = renderer; this.UserInput = userInput; this.Aim = aim; this.GameInitializator = gameInitializator; random = new Random(); this.gameObjects = new HashSet<GameObject>(); this.farm = new Farm(); this.farmManager = new FarmManager(); this.market = new Market(); this.presentFactory = new PresentFactory(); }
public void Initialize(FarmManager farmManager, Market market, PresentFactory presentFactory, ICollection<GameObject> farmObjects) { this.FillGameObjectCollection(farmObjects); this.FillMarketIngredients(market); this.FillInventory(farmManager); }
private void FillInventory(FarmManager farmManager) { foreach (var item in this.inventoryItems) { farmManager.AddMultipleToInventory(item, 5); } foreach (var ingredient in this.marketIngredients) { farmManager.AddMultipleToInventory(ingredient, 5); } foreach (var present in this.presents) { farmManager.AddToInventory(present); } }
public void SetInitialGameObjects() { this.farmManager = new FarmManager(); this.market = Market.Instance; var ingredientFactory = EasterFarm.Models.MarketPlace.MarketFactory.Get(Category.Ingredient); this.FillMarketCategory(ingredientFactory, IngredientType.Basket); this.presentFactory = new PresentFactory(); }