Exemple #1
0
        static void LoadGame()
        {
            SaveData data = SaveData.loadFromFile();

            world            = new GlobalWorld();
            world.player     = data.player;
            world.personList = data.personList;
        }
Exemple #2
0
        static void NewGame()
        {
            world = new GlobalWorld();
            Console.Clear();
            Console.Write("Podaj nazwę swojego pupilka: ");
            string pupilName = Console.ReadLine();
            Player player    = new Player(pupilName);

            world.player = player;
            new SaveData(world).SaveToFile();
        }
Exemple #3
0
 public SaveData(GlobalWorld world)
 {
     player     = world.player;
     personList = world.personList;
     pathfile   = Program.path + "save.dat";
 }