FarseerPhysics.Dynamics.BreakableBody.BreakableBody C# (CSharp) Method

BreakableBody() public method

public BreakableBody ( World world, IEnumerable vertices, float density, Vector2 position = newVector2(), float rotation ) : System
world World
vertices IEnumerable
density float
position Vector2
rotation float
return System
		public BreakableBody( World world, IEnumerable<Vertices> vertices, float density, Vector2 position = new Vector2(), float rotation = 0 )
		{
			_world = world;
			_world.contactManager.onPostSolve += onPostSolve;
			mainBody = new Body( _world, position, rotation, BodyType.Dynamic );

			foreach( Vertices part in vertices )
			{
				var polygonShape = new PolygonShape( part, density );
				Fixture fixture = mainBody.createFixture( polygonShape );
				parts.Add( fixture );
			}
		}

Same methods

BreakableBody::BreakableBody ( World world, IEnumerable shapes, Vector2 position = newVector2(), float rotation ) : System