AttachCompoundPolygon() public static method

public static AttachCompoundPolygon ( List list, float density, Body body, object userData = null ) : List
list List
density float
body FarseerPhysics.Dynamics.Body
userData object
return List
Example #1
0
        public static Body CreateCompoundPolygon(World world, List <Vertices> list, float density, Vector2 position = new Vector2(), float rotation = 0, BodyType bodyType = BodyType.Static, object userData = null)
        {
            //We create a single body
            var polygonBody = CreateBody(world, position, rotation, bodyType);

            FixtureFactory.AttachCompoundPolygon(list, density, polygonBody, userData);
            return(polygonBody);
        }
Example #2
0
        public static Body CreateCompoundPolygon(World world, List <Vertices> list, float density, Vector2 position, object userData = null)
        {
            //We create a single body
            Body polygonBody = CreateBody(world, position);

            FixtureFactory.AttachCompoundPolygon(list, density, polygonBody, userData);
            return(polygonBody);
        }
Example #3
0
        public static Body CreateCompoundPolygon(World world, List <Vertices> list, float density,
                                                 Vector2 position, PressPlay.FFWD.Components.Collider userData)
        {
            //We create a single body
            Body polygonBody = CreateBody(world, position);

            FixtureFactory.AttachCompoundPolygon(list, density, polygonBody, userData);
            return(polygonBody);
        }