Class DefaultStateStore
- Namespace
- Backdash.Synchronizing.State
- Assembly
- Backdash.dll
Binary store for temporary save and restore game states using IBinarySerializer<T>.
public sealed class DefaultStateStore : IStateStore
- Inheritance
-
DefaultStateStore
- Implements
- Inherited Members
Constructors
DefaultStateStore(int)
Binary store for temporary save and restore game states using IBinarySerializer<T>.
public DefaultStateStore(int hintSize)
Parameters
hintSize
intinitial memory used for infer the state size
Methods
Advance()
Advance the store pointer
public void Advance()
GetChecksum(in Frame)
public uint GetChecksum(in Frame frame)
Parameters
frame
Frame
Returns
Initialize(int)
Initialize the state buffer with capacity of saveCount
public void Initialize(int saveCount)
Parameters
saveCount
int
Last()
Returns last SavedFrame.
public SavedFrame Last()
Returns
Next()
Returns next writable SavedFrame.
public ref SavedFrame Next()
Returns
TryLoad(in Frame, out SavedFrame)
public bool TryLoad(in Frame frame, out SavedFrame savedFrame)
Parameters
frame
FramesavedFrame
SavedFrame