public static void Save(ReactionGameScript money) { BinaryFormatter formatter = new BinaryFormatter(); string path = Path.Combine(Application.persistentDataPath, "save.data"); FileStream stream = new FileStream(path, FileMode.Create); SaveData data = new SaveData(money); formatter.Serialize(stream, data); stream.Close(); }
public SaveData(ReactionGameScript game) { highScoreE = game.highScoreE; highScoreM = game.highScoreM; highScoreH = game.highScoreH; }