Exemple #1
0
    public static void SavePlayer(MoveByTouch moveByTouch)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/poly.bin";
        FileStream      stream    = new FileStream(path, FileMode.Create);
        PlayerData      data      = new PlayerData(moveByTouch);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Exemple #2
0
 public PlayerData(MoveByTouch moveByTouch)
 {
     highScore = moveByTouch.highScore;
 }