static void LoadGame() { SaveData data = SaveData.loadFromFile(); world = new GlobalWorld(); world.player = data.player; world.personList = data.personList; }
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(); }
public SaveData(GlobalWorld world) { player = world.player; personList = world.personList; pathfile = Program.path + "save.dat"; }