API reference
Class SavesModule
Namespace: MicroEngine.Saves
Assembly: MicroEngine.Saves.dll
Guide: Persistence
Saves as an engine module: registers Store as the engine’s SaveStore service, so other modules (achievements) and the game’s systems find it in the services. It schedules no frame system and writes nothing by itself: a slot is written when someone saves it. A composition that never adds the module has no store service, and a game that never creates a store writes no file.
public sealed class SavesModule : IEngineModuleInheritance
Implements
Examples
var store = new SaveStore("com.example.mygame");builder.Add(new SavesModule(store));// later, anywhere with the services:services.Get<SaveStore>().Save("progress", progress);Constructors
SavesModule(SaveStore)
Creates the module over store.
public SavesModule(SaveStore store)Parameters
store SaveStore
Exceptions
store is null.
Properties
Store
The store the module registers.
public SaveStore Store { get; }Property Value
Methods
Configure(EngineBuilder)
Registers Store as the SaveStore service.
public void Configure(EngineBuilder builder)Parameters
builder EngineBuilder