❇️ Added Settings classes to save and load local configurations
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Savegame;
|
||||
|
||||
/// <summary>
|
||||
/// Data structure for device-specific settings that should be saved / loaded to disk.
|
||||
/// Will not be synced across devices.
|
||||
/// </summary>
|
||||
public class SettingsData
|
||||
{
|
||||
/// <summary>
|
||||
/// To be incremented (and migrated) on modification.
|
||||
/// </summary>
|
||||
public const int VERSION = 1;
|
||||
public int version { get; set; } = VERSION;
|
||||
|
||||
public bool IsVersionValid()
|
||||
{
|
||||
return VERSION == version;
|
||||
}
|
||||
|
||||
public double runtimeSeconds { get; set; }
|
||||
public int windowSizeX { get; set; } = 800;
|
||||
public int windowSizeY { get; set; } = 600;
|
||||
public int windowPositionX { get; set; } = 100;
|
||||
public int windowPositionY { get; set; } = 100;
|
||||
public bool windowBorderless { get; set; }
|
||||
public float volumeMaster { get; set; } = 1.0f;
|
||||
public float volumeFx { get; set; } = 1.0f;
|
||||
public float volumeMusic { get; set; } = 1.0f;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user