Table of Contents

Class BoxCollider

Namespace
Alis.Core.Ecs.Component.Collider
Assembly
Alis.dll

The box collider class

public class BoxCollider : ACollider, IComponent<GameObject>, IEnabled, IIdentifier, IRuntime, IBuilder<BoxColliderBuilder>

Inheritance

Implements

Inherited Members

Fields

Rectangle

The rectangle

private RectangleI Rectangle

Field Value

RectangleI

Properties

AngularVelocity

Gets or sets the value of the angular velocity

public float AngularVelocity { get; set; }

Property Value

float

AutoTilling

Gets or sets the value of the auto tilling

public bool AutoTilling { get; set; }

Property Value

bool

Body

Gets or sets the value of the body

public Body Body { get; private set; }

Property Value

Body

BodyType

Gets or sets the value of the body type

public BodyType BodyType { get; set; }

Property Value

BodyType

FixedRotation

Gets or sets the value of the fixed rotation

public bool FixedRotation { get; set; }

Property Value

bool

Friction

Gets or sets the value of the friction

public float Friction { get; set; }

Property Value

float

Height

Gets or sets the value of the height

public float Height { get; set; }

Property Value

float

IgnoreGravity

Gets or sets the value of the gravity scale

public bool IgnoreGravity { get; set; }

Property Value

bool

IsTrigger

Gets or sets the value of the is trigger

public bool IsTrigger { get; set; }

Property Value

bool

LinearVelocity

Gets or sets the value of the linear velocity

public Vector2 LinearVelocity { get; set; }

Property Value

Vector2

Mass

Gets or sets the value of the mass

public float Mass { get; set; }

Property Value

float

RelativePosition

Gets or sets the value of the relative position

public Vector2 RelativePosition { get; set; }

Property Value

Vector2

Restitution

Gets or sets the value of the restitution

public float Restitution { get; set; }

Property Value

float

Rotation

Gets or sets the value of the rotation

public float Rotation { get; set; }

Property Value

float

Width

Gets or sets the value of the width

public float Width { get; set; }

Property Value

float

Methods

Builder()

Builders this instance

public BoxColliderBuilder Builder()

Returns

BoxColliderBuilder

The box collider builder

IsVisible(Vector2, Vector2, float)

Describes whether this instance is visible

public bool IsVisible(Vector2 cameraPosition, Vector2 cameraResolution, float pixelsPerMeter)

Parameters

cameraPosition Vector2

The camera position

cameraResolution Vector2

The camera resolution

pixelsPerMeter float

The pixels per meter

Returns

bool

The bool

Max(float[])

Maxes the corners x

private float Max(float[] cornersX)

Parameters

cornersX float[]

The corners

Returns

float

The max

Min(float[])

Mins the corners x

private float Min(float[] cornersX)

Parameters

cornersX float[]

The corners

Returns

float

The min

OnAwake()

Awakes this instance

public override void OnAwake()

OnBeforeUpdate()

Before the update

public override void OnBeforeUpdate()

OnCollision(Fixture, Fixture, Contact)

Describes whether this instance on collision

private bool OnCollision(Fixture fixtureA, Fixture fixtureB, Contact contact)

Parameters

fixtureA Fixture

The fixture

fixtureB Fixture

The fixture

contact Contact

The contact

Returns

bool

The bool

OnDraw()

Draws this instance

public override void OnDraw()

OnExit()

Ons the exit

public override void OnExit()

OnInit()

Inits this instance

public override void OnInit()

OnSeparation(Fixture, Fixture, Contact)

Ons the separation using the specified fixture a

private void OnSeparation(Fixture fixtureA, Fixture fixtureB, Contact contact)

Parameters

fixtureA Fixture

The fixture

fixtureB Fixture

The fixture

contact Contact

The contact

OnStart()

Starts this instance

public override void OnStart()

OnUpdate()

Updates this instance

public override void OnUpdate()

Render(IntPtr, Vector2, Vector2, float, Color)

Renders the renderer

public void Render(IntPtr renderer, Vector2 cameraPosition, Vector2 cameraResolution, float pixelsPerMeter, Color debugColor)

Parameters

renderer IntPtr

The renderer

cameraPosition Vector2

The camera position

cameraResolution Vector2

The camera resolution

pixelsPerMeter float

The pixels per meter

debugColor Color

The debug color

See Also