public void Setup() { _world = new World(800, 600, 1f) { GameSpeed = 2f }; _world.LoadLevel(new LevelWithFourBricks()); _ballsModel = new BallsModel(_world, BoxLength, BoxLength, new Vector2(0f, 0f), new Vector2(0f, 0f)); }
public World(int viewportWidth, int viewportHeight, float scale) { _boxLength *= scale; _startPositionForNewBall = new Vector2(viewportWidth / 2f, (viewportHeight/3f) * 2f); _viewportRect = new Rectangle(0, 0, viewportWidth, viewportHeight); _ballsModel = new BallsModel(this, (int)_boxLength, (int)_boxLength, _startPositionForNewBall, _startDirectionForNewBall); _frameModel = new FrameModel(this); _playerModel = new PlayerModel(this, scale); CurrentLevel = LoadLevel(1, scale); CurrentState = GameState.Normal; }
public void Setup() { _world = new World(800, 600, 1f) { GameSpeed = 1f }; _ballsModel = new BallsModel(_world, BoxLength, BoxLength, new Vector2(0f, 0f), new Vector2(0f, 0f)); }