Table of Contents

Class ArrayStateStore<TState>

Namespace
Backdash.Synchronizing.State.Stores
Assembly
Backdash.dll

Array pool store for temporary save and restore game states.

public sealed class ArrayStateStore<TState> : IStateStore<TState>, IDisposable where TState : notnull, new()

Type Parameters

TState
Inheritance
ArrayStateStore<TState>
Implements
IStateStore<TState>
Inherited Members

Constructors

ArrayStateStore()

public ArrayStateStore()

Methods

Dispose()

public void Dispose()

GetCurrent()

Returns current SavedFrame<TState>.

public ref TState GetCurrent()

Returns

TState

Initialize(int)

Initialize the state buffer with capacity of saveCount

public void Initialize(int saveCount)

Parameters

saveCount int

Last()

Returns last SavedFrame<TState>.

public ref readonly SavedFrame<TState> Last()

Returns

SavedFrame<TState>

Load(Frame)

Returns a SavedFrame<TState> for frame.

public ref readonly SavedFrame<TState> Load(Frame frame)

Parameters

frame Frame

Frame to load.

Returns

SavedFrame<TState>

SaveCurrent(in Frame, in int)

public ref readonly SavedFrame<TState> SaveCurrent(in Frame frame, in int checksum)

Parameters

frame Frame
checksum int

Returns

SavedFrame<TState>