public void CreateFarmItem(ConsumableFarmItemController farmItemController) { ConsumableFarmItem farmItem = FarmingGameController.GetItemStats(farmItemController.Type); _farmCell.SetConsumableFarmItem(farmItem); Instantiate(farmItemController, transform).Initiazliation(farmItem); }
private void ClickOnCell(FarmCell cell) { if (cell == null) { return; } if (cell.IsEmpty && _chooseCellForItem) { _cellGrid[cell.Coordinates.x, cell.Coordinates.y] .CreateFarmItem(_chooseFarmItemController); _chooseCellForItem = false; _chooseFarmItemController = null; } }
private void StartChoosenCellForItem(ShopItem shopItem) { _chooseFarmItemController = GetItem(shopItem.ItemType); _chooseCellForItem = true; }
public void CreateFarmItem(ConsumableFarmItemController farmItemController, ConsumableFarmItem farmItem) { Instantiate(farmItemController, transform).Initiazliation(farmItem); }