Exemplo n.º 1
0
 public void Push(ref GameState topstate)
 {
     if (inuse)
         throw new InvalidOperationException();
     next = topstate;
     topstate = this;
     inuse = true;
 }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 3
0
 public GameState()
 {
     this.inuse = false;
     this.next = null;
 }
Exemplo n.º 4
0
 public static void PopState()
 {
     if (topstate is RootState)
         throw new InvalidOperationException();
     topstate = topstate.Next;
 }
Exemplo n.º 5
0
 public static void PushState(GameState state)
 {
     if (state == null)
         throw new ArgumentNullException("state");
     state.Push(ref topstate);
 }