示例#1
0
 /// <param name="invoker">A delegate that invokes a delegate in the main thread.</param>
 /// <param name="updateAndDraw">A delegate that updates the game world and draws the game screen.</param>
 public AWGameRunner(AWGame game, Action<Action> invoker, Action<Exception> exceptionHandler, UpdateAndDrawAction updateAndDraw)
 {
     if (game == null || exceptionHandler == null || updateAndDraw == null) throw new ArgumentNullException();
     _game = game;
     _invoker = invoker;
     _exceptionHandler = exceptionHandler;
     _updateAndDraw = updateAndDraw;
     _timer = new Stopwatch();
     _pausedLock = new object();
     _exitSemaphore = new SemaphoreSlim(1, 1);
 }
示例#2
0
 public GameContent(AWGame game)
 {
     _game = game;
 }