Ejemplo n.º 1
0
        public DisplayViewModel(IGameBoy gameboy, IDisplay display, IMemory memory, IDispatcher dispatcher)
        {
            _gameBoy = gameboy;
            _display = display;
            _gameBoy.FrameCompleted += OnFrameCompleted;
            _memory     = memory;
            _dispatcher = dispatcher;

            _background    = new BackgroundViewModel(gameboy, display, dispatcher);
            _tileMap       = new TileMapViewModel(gameboy, display, dispatcher);
            _window        = new WindowViewModel(gameboy, display, dispatcher);
            _sprites       = new SpritesViewModel(gameboy, display, memory, dispatcher);
            _spriteLayer   = new SpriteLayerViewModel(gameboy, display, dispatcher);
            _displayTiming = new DisplayTimingViewModel(gameboy, display, dispatcher);
        }
Ejemplo n.º 2
0
        public DisplayViewModel(IGameBoy gameboy, IDisplay display, IMemory memory, IDispatcher dispatcher)
        {
            _gameBoy = gameboy;
              _display = display;
              _gameBoy.FrameCompleted += OnFrameCompleted;
              _memory = memory;
              _dispatcher = dispatcher;

              _background = new BackgroundViewModel(gameboy, display, dispatcher);
              _tileMap = new TileMapViewModel(gameboy, display, dispatcher);
              _window = new WindowViewModel(gameboy, display, dispatcher);
              _sprites = new SpritesViewModel(gameboy, display, memory, dispatcher);
              _spriteLayer = new SpriteLayerViewModel(gameboy, display, dispatcher);
              _displayTiming = new DisplayTimingViewModel(gameboy, display, dispatcher);
        }