public AdjustGameScaleTests(ITestOutputHelper output) { _pixelMapper = new PixelMapper(); _pixelMapper.Initialize(GameSize, GameSize); _pixelMapper.SetViewPortSize(ScreenSize, ScreenSize); int centerViewportOffsetX = _pixelMapper.MaxGridWidth / 2 - ScreenSize / 2; int centerViewportOffsetY = _pixelMapper.MaxGridHeight / 2 - ScreenSize / 2; _pixelMapper.SetViewPort(centerViewportOffsetX, centerViewportOffsetY); _output = output; }
public CoordPixelConverstionTests(ITestOutputHelper output) { _output = output; _pixelMapper = new PixelMapper(); _pixelMapper.Initialize(GameSize, GameSize); _pixelMapper.SetViewPortSize(ScreenSize, ScreenSize); _pixelMapper.LogData(output); if (DefaultCellSize != _pixelMapper.CellSize) { throw new Exception("Cell size is different than this test expects, these tests assume the DefaultCellSize is " + DefaultCellSize); } }