Beispiel #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)
        {
            Body body = CreateBody(world, position, rotation, bodyType, userData);

            FixtureFactory.AttachEllipse(xRadius, yRadius, edges, density, body);
            return(body);
        }
        public static Body CreateEllipse(World world, GGame.Math.Fix64 xRadius, GGame.Math.Fix64 yRadius, int edges, GGame.Math.Fix64 density, Vector2 position = new Vector2(), GGame.Math.Fix64 rotation = new Fix64(), BodyType bodyType = BodyType.Static, object userData = null)
        {
            Body body = CreateBody(world, position, rotation, bodyType, userData);

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