Beispiel #1
0
    private void LoadBattleData()
    {
        string filePath = Path.Combine(Application.streamingAssetsPath, battleDataFileName);

        if (File.Exists(filePath))
        {
            string dataAsJson = File.ReadAllText(filePath);
            loadedBattleData = BattleData.CreateFromJSON(dataAsJson);
            statusEffects    = loadedBattleData.statusData;
        }
        else
        {
            Debug.LogError("Cannot load game data");
        }
    }