void SaveCurrencyIDToFile() { if (currencyID.Value != tmpCurrencyID) { tmpCurrencyID = currencyID.Value; LoadCreateSaveLocally LCSL = this.GetComponent <LoadCreateSaveLocally>(); LCSL.SaveJSONLocally(LCSL.currencyID_FileName, currencyID); ShowEarnedAndPaidMoney(); //ChangeLaguage(); } }
public IEnumerator LoadOrCreateRecords() { LCSL = this.GetComponent <LoadCreateSaveLocally>(); for (int place = 0; place < timeHolderArray.Length; place++) { timeHolderArray[place].bestTime.minutes = 0; timeHolderArray[place].bestTime.seconds = 0; LCSL.LoadOrCreateJSONLocally("Example" + levelSwitch.Value + LCSL.record_FileName + place, timeHolderArray[place].bestTime); } yield return(null); isLoadSuccessful.toggle = true; }
/// <summary> /// Save monye amount of current currency to json file /// </summary> public void SaveMoneyToFile() { LoadCreateSaveLocally LCSL = this.GetComponent <LoadCreateSaveLocally>(); LCSL.SaveJSONLocally(LCSL.money_FileName + currencyID.Value, moneyArray.CurrencyAmounts[currencyID.Value]); }