Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CollisionResult

[16:7] extends: FxObj

Wraps FXGL's CollisionResult (com.almasb.fxgl.physics.CollisionResult), the per-pair SAT collision payload. Holds the two HitBoxes that touched. Typically supplied by the engine, not constructed directly.

Methods

  • CollisionResult ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing CollisionResult AussomJavaObject.

  • getBoxA ()

    Returns the first HitBox wrapper.

  • getBoxB ()

    Returns the second HitBox wrapper.

  • init (object BoxA, object BoxB)

    Initialises the result with the given HitBox wrappers.

    • @p BoxA is a HitBox wrapper.
    • @p BoxB is a HitBox wrapper.