Skip to content

IKeepsState

namespace Griff;
public interface IKeepsState

A part of a running game whose fields are its state: every GameSystem, the game’s clock and its random numbers. A rewind snapshot keeps each field’s value as it was (numbers, text, lists, dictionaries, the entities and components it points to, and the timers, tweens, coroutines and closures it holds, with what they hold), and putting the game back puts them back into the same part, so nothing it kept is lost. A field that isn’t state (a link to another part of the game, a list reused to save garbage) says so with NotStateAttribute. A system of a script’s is kept the same way.

public void Restored()

Called once a rewind has put the fields back (every part’s, so other parts are back too), to work out again what fields marked NotStateAttribute hold from the rest. Nothing by default.