private void BuyTimeMerch(MerchData data) { if (MerchTransaction != null) { MerchTransaction(data); GameState.instance.Merch.TimeMerchId = data.id; } }
private string MerchPropertiesToShow(MerchData merchData) { string ret = ""; if (merchData.coinPerSecond != 0) { ret += merchData.coinPerSecond + " coin per sec "; } if (merchData.timeLimit != 0) { ret += merchData.timeLimit + " sec "; } return ret; }
private void LoadMerchData(IList <MerchData> merchDataTarget, string sheetName) { merchDataTarget.Clear(); currentRows = dataReader.GetRows(sheetName); currentSheet = sheetName; int rowNum = currentRows.Count; for (int i = 0; i < rowNum; i++) { MerchData merchDataObject = new MerchData(); merchDataObject.id = LoadInt(i, "ID"); merchDataObject.name = LoadString(i, "Name"); merchDataObject.icon = LoadString(i, "Icon"); merchDataObject.cost = LoadDouble(i, "Cost"); merchDataObject.duration = LoadInt(i, "Duration"); merchDataObject.rewardMultiplier = LoadDouble(i, "RewardMultiplier"); merchDataTarget.Add(merchDataObject); } }
private void MerchTransaction(MerchData merch) { currencyState.Coins -= merch.upgradeCost; currencyState.SynchronizeRealCurrencyAndScreenCurrency(); }