/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // Initialise physics world // 9.8 gravity on Y, 0 gravity on X world = new World(new Vector2(0, 9.8f)); // Test init random = new Random(); prevKeyboardState = Keyboard.GetState(); objects.Add(new PhysicalObject(world, new Vector2(GraphicsDevice.Viewport.Width / 2.0f - 150, GraphicsDevice.Viewport.Height - 50), BodyType.Static, Content.Load<Texture2D>("Sprites/SquareColliderDebug"), new Vector2(GraphicsDevice.Viewport.Width-300, 100.0f), 1000)); objects.Add(new PhysicalObject(world, new Vector2(15, GraphicsDevice.Viewport.Height / 2), BodyType.Static, Content.Load<Texture2D>("Sprites/SquareColliderDebug"), new Vector2(30.0f, GraphicsDevice.Viewport.Height), 1000)); objects.Add(new PhysicalObject(world, new Vector2(GraphicsDevice.Viewport.Width - 300, GraphicsDevice.Viewport.Height / 2), BodyType.Static, Content.Load<Texture2D>("Sprites/SquareColliderDebug"), new Vector2(30.0f, GraphicsDevice.Viewport.Height), 1000)); player = new Actor(world, new Animation(new List<Vector2>() { new Vector2(1, 8), new Vector2(9, 18), new Vector2(19, 25), new Vector2(26, 32), new Vector2(33, 33) }, 0, new Vector2(6, 8), 9), new Vector2(200, 200), new Vector2(50, 55)); player.Load(Content); }