public Simulation2D(SimulationRobotEntity robotEntity, IDebugRenderContext debugRenderContext)
        {
            this.robotEntity = robotEntity;
             this.debugRenderContext = debugRenderContext;

             Content.RootDirectory = "Assets";
             ConvertUnits.SetDisplayUnitToSimUnitRatio(50f);

             graphicsDeviceManager = new GraphicsDeviceManager(this) {
            PreferredBackBufferWidth = 1280,
            PreferredBackBufferHeight = 720
             };

             var gravity = Vector2.Zero;
             world = new World(gravity);
             robotEntity.Initialize(world);
        }
Esempio n. 2
0
        public Simulation2D(SimulationRobotEntity robotEntity, IDebugRenderContext debugRenderContext)
        {
            this.robotEntity        = robotEntity;
            this.debugRenderContext = debugRenderContext;

            Content.RootDirectory = "Assets";
            ConvertUnits.SetDisplayUnitToSimUnitRatio(50f);

            graphicsDeviceManager = new GraphicsDeviceManager(this)
            {
                PreferredBackBufferWidth  = 1280,
                PreferredBackBufferHeight = 720
            };

            var gravity = Vector2.Zero;

            world = new World(gravity);
            robotEntity.Initialize(world);
        }