Esempio n. 1
0
        //private TextureManager _textureManager;

        public PongGame()
        {
            _graphics             = new GraphicsDeviceManager(this);
            _collisionManager     = new CollisionManager();
            _entityFactory        = new EntityFactory(this);
            Content.RootDirectory = "Content";
            _gameStateManager     = new GameStateManager(this);
            //_textureManager = new TextureManager(this);

            //_gameStateManager.AddGameState(new PlayingGameState(this));
            _gameStateManager.AddGameState(new InitializingGameState(this));


            //Components.Add(_textureManager);
            Components.Add(_gameStateManager);


            //Services.AddService(typeof(ITextureManager), _textureManager);
            Services.AddService(typeof(IEntityFactory), _entityFactory);
            Services.AddService(typeof(CollisionManager), _collisionManager);
            Services.AddService(typeof(ContentManager), Content);
            Services.AddService(typeof(GameStateManager), _gameStateManager);
        }
Esempio n. 2
0
 public EntityManager(ContentManager contentManager, Microsoft.Xna.Framework.Game game) : base(game)
 {
     _contentManager   = contentManager;
     _entities         = new List <IEntity>();
     _collisionManager = new CollisionManager();
 }