예제 #1
0
 public StatesManager(Game game, ISwitchComponent switchComponent)
 {
     if (game == null)
     {
         throw new ArgumentNullException("game");
     }
     _game           = game;
     SwitchComponent = switchComponent;
 }
예제 #2
0
        public GameStatesManager(D3DEngine engine, Game game, ISwitchComponent switchComponent, int allocatedThreadPool = 3) :
            base("GameStatesManager")
        {
            if (game == null)
            {
                logger.Error("game value is nullin constructor");
                throw new ArgumentNullException("Game is null");
            }

            IsSystemComponent = true;
            _engine           = engine;
            _game             = game;
            SwitchComponent   = switchComponent;
            _loadContext      = _engine.CreateDeviceContext();
#if DEBUG
            _loadContext.DebugName = "GameState Deffered Context";
#endif
            //Activate this component
            this.EnableComponent();
        }