Ctrl+K

BreakableBody

Declaration

public class tainicom.Aether.Physics2D.Common.PhysicsLogic.BreakableBody

A type of body that supports multiple fixtures that can break apart.

Constructors

BreakableBody

void BreakableBody(World world, IEnumerable<Vertices> vertices, float density, Vector2 position = null, float rotation = 0)

Parameters:

Name Type Description
world tainicom.Aether.Physics2D.Dynamics.World
vertices System.Collections.Generic.IEnumerable
density System.Single
position Strawberry.Math.Vector2 = null
rotation System.Single = 0

BreakableBody

void BreakableBody(World world, IEnumerable<Shape> shapes, Vector2 position = null, float rotation = 0)

Parameters:

Name Type Description
world tainicom.Aether.Physics2D.Dynamics.World
shapes System.Collections.Generic.IEnumerable
position Strawberry.Math.Vector2 = null
rotation System.Single = 0

BreakableBody

void BreakableBody(World world, Vertices vertices, float density, Vector2 position = null, float rotation = 0)

Parameters:

Name Type Description
world tainicom.Aether.Physics2D.Dynamics.World
vertices tainicom.Aether.Physics2D.Common.Vertices
density System.Single
position Strawberry.Math.Vector2 = null
rotation System.Single = 0

Properties

World

World World { get }

MainBody

Body MainBody { get }

State

BreakableBodyState State { get }

Fields

Parts

List<Fixture> Parts

Strength

The force needed to break the body apart. Default: 500

float Strength

Methods

Update

void Update()

Nested Types

tainicom.Aether.Physics2D.Common.PhysicsLogic.BreakableBody.BreakableBodyState

Unbroken static

BreakableBodyState Unbroken = 0

ShouldBreak static

BreakableBodyState ShouldBreak = 1

Broken static

BreakableBodyState Broken = 2