I have no idea why, but I canβt understand why this does not work ... I'm trying to make something really simple, for example, something that just crashes from the screen.
It seems that with the last download and the first code sample on the site, I'm still not right.
I have it:
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Collections;
using Microsoft.Xna.Framework.Input;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Collision.Shapes;
namespace Cross {
public class Game1 : Microsoft.Xna.Framework.Game {
GraphicsDeviceManager graphics;
public Game1() {
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
graphics.IsFullScreen = false;
graphics.PreferredBackBufferHeight = 600;
graphics.PreferredBackBufferWidth = 1200;
this.Window.Title = "Game";
}
protected override void Initialize() {
World world = new World(Vector2.Zero);
Body myBody = world.CreateBody();
myBody.BodyType = BodyType.Dynamic;
CircleShape circleShape = new CircleShape(0.5f);
Fixture fixture = myBody.CreateFixture(circleShape);
base.Initialize();
}
protected override void LoadContent() {
}
protected override void UnloadContent() {
}
protected override void Update(GameTime gameTime) {
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime) {
base.Draw(gameTime);
}
}
}
But I get 2 errors:
No CreateBody()(exists AddBreakableBody()though)
'FarseerPhysics.Dynamics.World' does not contain a definition for 'CreateBody' and no extension method 'CreateBody' accepting a first argument of type 'FarseerPhysics.Dynamics.World' could be found (are you missing a using directive or an assembly reference?)
The CircleShape constructor takes 2 arguments (this is a simple but still an error in the example)
'FarseerPhysics.Collision.Shapes.CircleShape' does not contain a constructor that takes 1 arguments
I have tried so many things and am confused why I can get this. Does this code work for others? Is my dll gone bad?
source
share