public void Push(ref GameState topstate) { if (inuse) throw new InvalidOperationException(); next = topstate; topstate = this; inuse = true; }
static Core() { console = new DoomConsole(); video = new NullVideoSystem(false); music = new MusicPlayer(); archives = new MultiArchive(); topstate = null; stopwatch = Stopwatch.StartNew(); lasttime = 0; coresystems = new Dictionary<string,Type>(); PushState(new RootState()); }
public GameState() { this.inuse = false; this.next = null; }
public static void PopState() { if (topstate is RootState) throw new InvalidOperationException(); topstate = topstate.Next; }
public static void PushState(GameState state) { if (state == null) throw new ArgumentNullException("state"); state.Push(ref topstate); }