Esempio n. 1
0
 private void BuyTimeMerch(MerchData data)
 {
     if (MerchTransaction != null)
     {
         MerchTransaction(data);
         GameState.instance.Merch.TimeMerchId = data.id;
     }
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
    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);
        }
    }
Esempio n. 4
0
    private void MerchTransaction(MerchData merch)
    {
        currencyState.Coins -= merch.upgradeCost;

        currencyState.SynchronizeRealCurrencyAndScreenCurrency();
    }