AttachEllipse() public static method

public static AttachEllipse ( float xRadius, float yRadius, int edges, float density, Body body, object userData = null ) : Fixture
xRadius float
yRadius float
edges int
density float
body FarseerPhysics.Dynamics.Body
userData object
return FarseerPhysics.Dynamics.Fixture
Ejemplo n.º 1
0
        public static Body CreateEllipse(World world, float xRadius, float yRadius, int edges, float density, Vector2 position = new Vector2(), float rotation = 0, BodyType bodyType = BodyType.Static, object userData = null)
        {
            var body = CreateBody(world, position, rotation, bodyType);

            FixtureFactory.AttachEllipse(xRadius, yRadius, edges, density, body, userData);
            return(body);
        }
Ejemplo n.º 2
0
        public static Body CreateEllipse(World world, float xRadius, float yRadius, int edges, float density,
                                         Vector2 position, object userData = null)
        {
            Body body = CreateBody(world, position);

            FixtureFactory.AttachEllipse(xRadius, yRadius, edges, density, body, userData);
            return(body);
        }