Esempio n. 1
0
        public static void ReadSaveGameTo(ISaveable _saveable, string _path)
        {
            if (File.Exists(_path))
            {
                FileStream memStream = new FileStream(_path, FileMode.Open, FileAccess.Read);

                //start async fileread

                int saveGameVersion = GetInt(memStream);
                _saveable.ReadFrom(memStream, saveGameVersion);

                memStream.Dispose();
            }
        }