void AddOrderOne() { _buyPrices = GameObject.Find("Main Camera").GetComponent <WarehouseManager>().buyPrices; SupplyOrderQuantity += 1; BuyMenu2 bm = GameObject.Find("OrderSupplyMenu").GetComponent <BuyMenu2>(); bm.TotalOrderCost += _price; bm._totalOrder[ProductName] = SupplyOrderQuantity; GetComponent <Text>().text = _originalText + "($" + _buyPrices[ProductName] + "): " + SupplyOrderQuantity.ToString(); GameObject.FindObjectOfType <Panels>().UpdateProjected(); }
void RemoveOrder() { _buyPrices = GameObject.Find("Main Camera").GetComponent <WarehouseManager>().buyPrices; SupplyOrderQuantity -= DeltaQuantity; if (SupplyOrderQuantity < 0) { SupplyOrderQuantity = 0; } else { BuyMenu2 bm = GameObject.Find("OrderSupplyMenu").GetComponent <BuyMenu2>(); bm.TotalOrderCost -= DeltaQuantity * _price; bm._totalOrder[ProductName] = SupplyOrderQuantity; GetComponent <Text>().text = _originalText + "($" + _buyPrices[ProductName] + "): " + SupplyOrderQuantity.ToString(); } GameObject.FindObjectOfType <Panels>().UpdateProjected(); }