Beispiel #1
0
        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);
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        public void SavePlayer(MyBots bot)
        {
            string json = JsonConvert.SerializeObject(bot);

            System.IO.File.WriteAllText("E:/playerinfo.txt", json);
        }
Beispiel #4
0
 public void SavePlayer(MyBots bot)
 {
     string json = JsonConvert.SerializeObject(bot);
     System.IO.File.WriteAllText("E:/playerinfo.txt", json);
 }