private void LoadSpringContent(GraphicsDevice graphicsDevice)
        {
            _springLineBrush = new LineBrush(_springLineThickness, _springLineColor);
            _springCircleBrush = new CircleBrush(2, _springLineColor, _springLineColor);

            _springLineBrush.Load(graphicsDevice);
            _springCircleBrush.Load(graphicsDevice);
        }
Ejemplo n.º 2
0
        public override void LoadContent()
        {
            _circleBrush = new CircleBrush(64, Color.White, Color.Black);
            _circleBrush.Load(ScreenManager.GraphicsDevice);

            _circleBody = BodyFactory.Instance.CreateCircleBody(PhysicsSimulator, 64, 1);
            _circleBody.Position = new Vector2(725, 384);
            _circleGeom = GeomFactory.Instance.CreateCircleGeom(PhysicsSimulator, _circleBody, 64, 20);

            _rectangleBody = BodyFactory.Instance.CreateRectangleBody(PhysicsSimulator, 128, 128, 1);
            _rectangleBody.Position = new Vector2(256, 384);
            GeomFactory.Instance.CreateRectangleGeom(PhysicsSimulator, _rectangleBody, 128, 128);

            _rectangleBrush = new RectangleBrush(128, 128, Color.Gold, Color.Black);
            _rectangleBrush.Load(ScreenManager.GraphicsDevice);

            _p1 = ScreenManager.ScreenCenter;
            _p2 = _circleGeom.Position;

            _lineBrush = new LineBrush(1, Color.Black);
            _lineBrush.Load(ScreenManager.GraphicsDevice);

            _marker = new CircleBrush(3, Color.Red, Color.Red);
            _marker.Load(ScreenManager.GraphicsDevice);

            base.LoadContent();
        }
        private void LoadSliderJointContent(GraphicsDevice graphicsDevice)
        {
            _sliderJointLineBrush = new LineBrush(_sliderJointLineThickness, _sliderJointColor);
            _sliderJointRectangleBrush = new RectangleBrush(10, 10, _sliderJointColor, _sliderJointColor);

            _sliderJointLineBrush.Load(graphicsDevice);
            _sliderJointRectangleBrush.Load(graphicsDevice);
        }
        private void LoadRevoluteJointContent(GraphicsDevice graphicsDevice)
        {
            _revoluteJointLineBrush = new LineBrush(_revoluteJointLineThickness, _revoluteJointColor);
            _revoluteJointRectangleBrush = new RectangleBrush(10, 10, _revoluteJointColor, _revoluteJointColor);

            _revoluteJointLineBrush.Load(graphicsDevice);
            _revoluteJointRectangleBrush.Load(graphicsDevice);
        }
 private void LoadEdgeContent(GraphicsDevice graphicsDevice)
 {
     _edgeLineBrush = new LineBrush(_edgeLineThickness, _edgeColor);
     _edgeLineBrush.Load(graphicsDevice);
 }
 private void LoadCoordinateAxisContent(GraphicsDevice graphicsDevice)
 {
     _coordinateAxisLineBrush = new LineBrush(_coordinateAxisLineThickness, _coordinateAxisColor);
     _coordinateAxisLineBrush.Load(graphicsDevice);
 }
 private void LoadAABBContent(GraphicsDevice graphicsDevice)
 {
     //load aabb texture
     _aabbLineBrush = new LineBrush(_aabbLineThickness, _aabbColor);
     _aabbLineBrush.Load(graphicsDevice);
 }