public static void saveToQuickdata(int fileIndex, string fileName, Vars.Difficulty difficulty, float time, float infoPercent, float physPercent)
    {
#if UNITY_WEBPLAYER
        return;
#endif

        Properties quickdataProp = new Properties();
        string     path          = Application.persistentDataPath + "/quickData.sav";
        bool       fileExists    = File.Exists(path);
        if (fileExists)
        {
            byte[] bArr    = File.ReadAllBytes(path);
            string content = Utilities.bytesToString(bArr);
            quickdataProp.parse(content);
        }

        quickdataProp.setString("fn" + fileIndex, fileName);
        quickdataProp.setInt("diff" + fileIndex, ((int)difficulty));
        quickdataProp.setFloat("t" + fileIndex, time);
        quickdataProp.setFloat("info" + fileIndex, infoPercent);
        quickdataProp.setFloat("phys" + fileIndex, physPercent);

        byte[] bArr2 = Utilities.stringToBytes(quickdataProp.convertToString());

        File.WriteAllBytes(path, bArr2);
    }
    public void setSettingsDifficulty(Vars.Difficulty difficulty)
    {
        string diffName = difficultyProperties.getString(((int)difficulty) + "name");

        // apply padding to name
        while (diffName.Length < 14)
        {
            if (diffName.Length % 2 == 0)
            {
                diffName = " " + diffName;
            }
            else
            {
                diffName = diffName + " ";
            }
        }
        // carats
        string left = "<";
        //if (difficulty == Vars.Difficulty.EASY) left = " ";
        string right = ">";
        //if (difficulty == Vars.Difficulty.CRUEL || (!Vars.hardModesUnlocked && difficulty == Vars.Difficulty.STANDARD)) right = " ";

        string diffStr = properties.getString("difficulty") + ": " + left + diffName + right;

        settingsDifficultyBox.setPlainText(diffStr);

        // description
        string diffDescrip = difficultyProperties.getString(((int)difficulty) + "description");

        settingsDiffDescripBox.setPlainText(diffDescrip);

        settingsDifficulty = difficulty;
    }
 void beginNewFile(int fileIndex, Vars.Difficulty difficulty, bool tutorials)
 {
     Vars.saveFileIndexLastUsed = fileIndex;
     Vars.loadData(fileIndex);
     Vars.difficulty       = difficulty;
     Vars.tutorialsEnabled = tutorials;
     whiteScreenTransition();
 }
 public void create(string fileName, Vars.Difficulty difficulty, float time, float infoPercent, float physPercent)
 {
     if (fileName == "-1" || difficulty == Vars.Difficulty.NONE || time < 0 || infoPercent < 0 || physPercent < 0)
     {
         created = false;
         return;
     }
     created          = true;
     this.fileName    = fileName;
     this.difficulty  = difficulty;
     this.time        = time;
     this.infoPercent = infoPercent;
     this.physPercent = physPercent;
 }