Interface IStateStore<TState>
- Namespace
- Backdash.Synchronizing.State
- Assembly
- Backdash.dll
Repository for temporary save and restore game states.
public interface IStateStore<TState> : IDisposable where TState : notnull, new()
Type Parameters
TState
Game state type.
- Inherited Members
Methods
GetCurrent()
Returns current SavedFrame<TState>.
ref TState GetCurrent()
Returns
- TState
Initialize(int)
Initialize the state buffer with capacity of saveCount
void Initialize(int saveCount)
Parameters
saveCount
int
Last()
Returns last SavedFrame<TState>.
ref readonly SavedFrame<TState> Last()
Returns
- SavedFrame<TState>
Load(Frame)
Returns a SavedFrame<TState> for frame
.
ref readonly SavedFrame<TState> Load(Frame frame)
Parameters
frame
FrameFrame to load.
Returns
- SavedFrame<TState>
SaveCurrent(in Frame, in int)
Save current state for frame
with checksum
value.
ref readonly SavedFrame<TState> SaveCurrent(in Frame frame, in int checksum)
Parameters
Returns
- SavedFrame<TState>