public void BuyButtonClick() { DataScript.SData.Money -= (int)countSlider.value * price; DataScript.SData.ItemsCount[number] += (int)countSlider.value; DataScript.SaveSourcesData(); buyWindowObject.SetActive(false); UIManager.itemsPanel.UpdateSingleItemWithAnimation(number); }
public void OnEndEditMoney() { int.TryParse(moneyInputField.text, out DataScript.SData.Money); DataScript.SaveSourcesData(); }