Table of Contents

Struct SensorEventData

Namespace
Stride.CommunityToolkit.Box2D.Events
Assembly
Stride.CommunityToolkit.Box2D.dll

A sensor overlap event delivered to ISensorEventHandler implementations.

public readonly record struct SensorEventData : IEquatable<SensorEventData>
Implements
Inherited Members

Constructors

SensorEventData(SensorEventType, Entity, Entity, B2ShapeId, B2ShapeId)

A sensor overlap event delivered to ISensorEventHandler implementations.

public SensorEventData(SensorEventType Type, Entity SensorEntity, Entity VisitorEntity, B2ShapeId SensorShapeId, B2ShapeId VisitorShapeId)

Parameters

Type SensorEventType

The kind of sensor event.

SensorEntity Entity

The entity owning the sensor shape.

VisitorEntity Entity

The entity that entered or left the sensor.

SensorShapeId B2ShapeId

The sensor shape.

VisitorShapeId B2ShapeId

The visiting shape.

Properties

SensorEntity

The entity owning the sensor shape.

public Entity SensorEntity { get; init; }

Property Value

Entity

SensorShapeId

The sensor shape.

public B2ShapeId SensorShapeId { get; init; }

Property Value

B2ShapeId

Type

The kind of sensor event.

public SensorEventType Type { get; init; }

Property Value

SensorEventType

VisitorEntity

The entity that entered or left the sensor.

public Entity VisitorEntity { get; init; }

Property Value

Entity

VisitorShapeId

The visiting shape.

public B2ShapeId VisitorShapeId { get; init; }

Property Value

B2ShapeId