C# Class FarseerPhysics.Dynamics.BreakableBody

A type of body that supports multiple fixtures that can break apart.
Datei anzeigen Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
isBroken bool
mainBody Body
parts List
strength float

Public Methods

Method Description
BreakableBody ( World world, IEnumerable shapes, Vector2 position = newVector2(), float rotation ) : System
BreakableBody ( World world, IEnumerable vertices, float density, Vector2 position = newVector2(), float rotation ) : System
breakBody ( ) : void
decompose ( ) : void
onPostSolve ( Contact contact, ContactVelocityConstraint impulse ) : void
update ( ) : void

Method Details

BreakableBody() public method

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

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

breakBody() public method

public breakBody ( ) : void
return void

decompose() public method

public decompose ( ) : void
return void

onPostSolve() public method

public onPostSolve ( Contact contact, ContactVelocityConstraint impulse ) : void
contact FarseerPhysics.Dynamics.Contacts.Contact
impulse FarseerPhysics.Dynamics.Contacts.ContactVelocityConstraint
return void

update() public method

public update ( ) : void
return void

Property Details

isBroken public_oe property

public bool isBroken
return bool

mainBody public_oe property

public Body,FarseerPhysics.Dynamics mainBody
return Body

parts public_oe property

public List parts
return List

strength public_oe property

The force needed to break the body apart. Default: 500
public float strength
return float