-
Notifications
You must be signed in to change notification settings - Fork 4
/
SaveManager.cs
42 lines (37 loc) · 1.1 KB
/
SaveManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MonoGameSaveManager
{
/// <summary>
/// Manages a save file for you.
/// </summary>
public abstract class SaveManager
{
protected string folderName, fileName;
/// <summary>
/// Access save game data.
/// </summary>
public SaveData Data { get; set; }
/// <summary>
/// Creates a new save game manager.
/// </summary>
/// <param name="folderName">Name of the folder containing the save.</param>
/// <param name="fileName">Name of the save file.</param>
public SaveManager(string folderName, string fileName)
{
this.folderName = folderName;
this.fileName = fileName;
this.Data = new SaveData();
}
/// <summary>
/// Loads the data from disk to memory.
/// </summary>
public abstract void Load();
/// <summary>
/// Saves the data in memory to disk.
/// </summary>
public abstract void Save();
}
}