Beispiel #1
0
    public static void SavePlayer(AugelBehavior augel)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/player.augelsave";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        PlayerData data = new PlayerData(augel);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Beispiel #2
0
 public PlayerData(AugelBehavior augel)
 {
     healthSave = augel.health;
 }