Beispiel #1
0
 public ImageRenderer(
     StructTable<string, ImageDescriptor> imageDescriptors,
     Images images,
     SpriteBatch spriteBatch)
 {
     _imageDescriptors = imageDescriptors;
     _images = images;
     _spriteBatch = spriteBatch;
 }
Beispiel #2
0
 protected override void LoadContent()
 {
     _spriteBatch = new SpriteBatch(GraphicsDevice);
     _colors = new GameColors();
     _patterns = new GamePatterns();
     _imageDescriptors = new GameImageDescriptors();
     _images = new Images(GraphicsDevice, _colors, _patterns);
     _imageRenderer = new ImageRenderer(_imageDescriptors, _images, _spriteBatch);
     _gameController = new GameController(this,_imageRenderer);
     _previousKeyboardState = Keyboard.GetState();
     _players.ToList().ForEach(x => _previousGamePadState[x] = GamePad.GetState(x));
 }