public MyBots LoadPlayer() { MyBots fbot = new MyBots(); using (StreamReader r = new StreamReader("E:/playerinfo.txt")) { string json = r.ReadToEnd(); // List<Item> items = JsonConvert.DeserializeObject<List<Item>>(json); fbot = JsonConvert.DeserializeObject <MyBots>(json); } return(fbot); }
public MyBots LoadPlayer() { MyBots fbot = new MyBots(); using (StreamReader r = new StreamReader("E:/playerinfo.txt")) { string json = r.ReadToEnd(); // List<Item> items = JsonConvert.DeserializeObject<List<Item>>(json); fbot = JsonConvert.DeserializeObject<MyBots>(json); } return fbot; }
public void SavePlayer(MyBots bot) { string json = JsonConvert.SerializeObject(bot); System.IO.File.WriteAllText("E:/playerinfo.txt", json); }
public void SavePlayer(MyBots bot) { string json = JsonConvert.SerializeObject(bot); System.IO.File.WriteAllText("E:/playerinfo.txt", json); }