public void loadFRodInfo() { // load fishing rod informations TextAsset fRodJson = Resources.Load <TextAsset>("fishingRod"); FRodContainerList fRodContainer = JsonUtility.FromJson <FRodContainerList>(fRodJson.ToString()); for (int i = 0; i < 9; i++) { fRodCost[i] = fRodContainer.fRods[i].cost; } fRodDescription = fRodContainer.Description; }
private void Start() { SerializablePlayerData playerData = SaveMgr.LoadPlayerData(); baitInf.Clear(); // load baits informations TextAsset baitJson = Resources.Load <TextAsset>("bait"); BaitContainerList baitContainer = JsonUtility.FromJson <BaitContainerList>(baitJson.ToString()); baitInf.Add("min", baitContainer.baits[playerData.currBaitIndex].min); baitInf.Add("max", baitContainer.baits[playerData.currBaitIndex].max); fRodInf.Clear(); // load fishing rods informations TextAsset fRodJson = Resources.Load <TextAsset>("fishingRod"); FRodContainerList fRodContainer = JsonUtility.FromJson <FRodContainerList>(fRodJson.ToString()); fRodInf.Add("min", fRodContainer.fRods[playerData.fRodLevel].min); fRodInf.Add("max", fRodContainer.fRods[playerData.fRodLevel].max); }