Skip to main content

CollisionEventArgs

Namespace: MonineEngine.Core

Arguments for a collision event.

public class CollisionEventArgs : System.EventArgs

Inheritance ObjectEventArgsCollisionEventArgs
Attributes NullableContextAttribute, NullableAttribute

Properties

A

Gets the first collider in the collision.

public Collider A { get; }

Property Value

Collider

B

Gets the second collider in the collision.

public Collider B { get; }

Property Value

Collider

Trigger

Gets whether the collision was a trigger collision or not.

public bool Trigger { get; }

Property Value

Boolean

Type

Gets the type of collision that occured.

public CollisionEventType Type { get; }

Property Value

CollisionEventType

Constructors

CollisionEventArgs(Collider, Collider, CollisionEventType, Boolean)

Constructs a new CollisionEventArgs with the two colliding colliders.

public CollisionEventArgs(Collider a, Collider b, CollisionEventType type, bool trigger)

Parameters

a Collider
The first collider in the collision.

b Collider
The second collider in the collision.

type CollisionEventType
The type of collision that occured.

trigger Boolean
Whether the collision was a trigger collision or not.