public void SellButton() { // Set amount to sell _allInfo.textMeshProUGUI.text = _oreAmount.ToString(); if (_oreAmount <= 0) { SellingController._oresToSell.Remove(_ore.index); } else if (SellingController._oresToSell.ContainsKey(_ore.index)) { SellingController._oresToSell[_ore.index] = _oreAmount; } else { SellingController._oresToSell.Add(_ore.index, _oreAmount); SellingController._oresToSell.OrderBy(valuePair => valuePair.Key); _sellingController.StartSellCoroutine(); } }
public void SellButton() { // Set amount to sell _allInfo.textMeshProUGUI.text = _oreAmount.ToString(); if (_oreAmount <= 0) { SellingController._oresToSell.Remove(_ore.index); } else if (SellingController._oresToSell.ContainsKey(_ore.index)) { SellingController._oresToSell[_ore.index] = _oreAmount; } else { SellingController._oresToSell.Add(_ore.index, _oreAmount); SellingController._oresToSell.OrderBy(valuePair => valuePair.Key); _sellingController.StartSellCoroutine(); } menu2OpenAfterTransaction.SetActive(true); gameObject.SetActive(false); }