Class AllHitCallback
java.lang.Object
com.deco2800.game.physics.raycast.AllHitCallback
- All Implemented Interfaces:
RayCastCallback
public class AllHitCallback extends java.lang.Object implements RayCastCallback
Cast a ray against all colliders that match the layer mask. All hits will be stored, with an empty
array if no hits occurred.
-
Field Summary
Fields Modifier and Type Field Description shortlayerMask -
Constructor Summary
Constructors Constructor Description AllHitCallback() -
Method Summary
Modifier and Type Method Description RaycastHit[]getHitsAndClear()floatreportRayFixture(Fixture fixture, Vector2 point, Vector2 normal, float fraction)
-
Field Details
-
layerMask
public short layerMask
-
-
Constructor Details
-
AllHitCallback
public AllHitCallback()
-
-
Method Details
-
getHitsAndClear
-
reportRayFixture
- Specified by:
reportRayFixturein interfaceRayCastCallback
-