Beispiel #1
0
 /// <summary>
 /// Load action
 /// </summary>
 /// <param name="stream"></param>
 private static void Load(Stream stream)
 {
     using (BinaryReader br = new BinaryReader(stream))
     {
         _current       = new Progress.Data(br.ReadInt32());
         _current.Score = br.ReadInt32();
     }
 }
 /// <summary>
 /// Load action
 /// </summary>
 /// <param name="stream"></param>
 private static void Load(Stream stream)
 {
     using (BinaryReader br = new BinaryReader(stream))
     {
         _current = new Progress.Data(br.ReadInt32());
         _current.Score = br.ReadInt32();
     }
 }
Beispiel #3
0
        /// <summary>
        /// Loads a default instance
        /// </summary>
        private static void LoadDefault(Int32 serialNumber)
        {
            _current = new Progress.Data(serialNumber)
            {
                SessionScore = 0,
                Score        = 0,
            };

            // Saves the default instance
            Save();
        }
Beispiel #4
0
 /// <summary>
 /// Initialization
 /// </summary>
 /// <param name="game"></param>
 public static void Initialize(Game game)
 {
     _fileManager = (FileManager)game.Services.GetService(typeof(FileManager));
     _current     = new Data(0);
 }
        /// <summary>
        /// Loads a default instance
        /// </summary>
        private static void LoadDefault(Int32 serialNumber)
        {
            _current = new Progress.Data(serialNumber) {
                SessionScore = 0,
                Score = 0,
            };

            // Saves the default instance
            Save();
        }
 /// <summary>
 /// Initialization
 /// </summary>
 /// <param name="game"></param>
 public static void Initialize(Game game)
 {
     _fileManager = (FileManager)game.Services.GetService(typeof(FileManager));
     _current = new Data(0);
 }