public void Execute() { var inventory = _customer.GetComponent <Inventory>(); if (inventory.Gold > _shopController.GetItemPrice()) { var itemToBuy = _shopController.SellItem(); inventory.AddItem(itemToBuy); inventory.AddGold(-itemToBuy.price); } else { _shopController.AddMessage("You do not have enough gold"); } }